summaryrefslogtreecommitdiff
path: root/Fundamentals_Of_Thermodynamics/Chapter9_6.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Fundamentals_Of_Thermodynamics/Chapter9_6.ipynb')
-rwxr-xr-xFundamentals_Of_Thermodynamics/Chapter9_6.ipynb588
1 files changed, 0 insertions, 588 deletions
diff --git a/Fundamentals_Of_Thermodynamics/Chapter9_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter9_6.ipynb
deleted file mode 100755
index db80c9d5..00000000
--- a/Fundamentals_Of_Thermodynamics/Chapter9_6.ipynb
+++ /dev/null
@@ -1,588 +0,0 @@
-{
- "metadata": {
- "name": "",
- "signature": "sha256:14f50faeadc2ed8de4732f59bac3e49ea9db1041eaf016b1692117fea4d3a511"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter9:SECOND-LAW ANALYSIS FOR A CONTROL VOLUME"
- ]
- },
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Ex9.1:pg-336"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1\n",
- "#work done by steam\n",
- "\n",
- "hi=3051.2 #initial specific heat of enthalpy of steam in kJ/kg\n",
- "si=7.1228 #initial specific entropy of steam in kJ/kg-K\n",
- "Pe=0.15 #final pressure in MPa\n",
- "se=si #specific entropy in final state in kJ/kg-K\n",
- "sf=1.4335 #in kJ/kg-K\n",
- "sfg=5.7897 #in kJ/kg-K\n",
- "vi=50.0 #velocity with which steam enters turbine in m/s\n",
- "ve=200.0 #velocity with which steam leaves the turbine in m/s\n",
- "xe=(se-sf)/sfg #quality of steam in final state\n",
- "hf=467.1 #in kJ/kg\n",
- "hfg=2226.5 #in kJ/kg\n",
- "he=hf+xe*hfg #final specific heat of enthalpy of steam in kJ/kg\n",
- "w=hi+vi**2/(2*1000)-he-ve**2/(2*1000) #work of steam for isentropic process in kJ/kg\n",
- "print\"\\n hence, work per kilogram of steam for this isentropic process is\",round(w,1),\"KJ/kg\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence, work per kilogram of steam for this isentropic process is 377.5 KJ/kg\n"
- ]
- }
- ],
- "prompt_number": 5
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.2:pg-337"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 2\n",
- "#exit velocity of steam from nozzle\n",
- "\n",
- "hi=3051.2 #initial specific heat of enthalpy in kJ/kg\n",
- "si=7.1228 #initial specific entropy in kJ/kg-K\n",
- "se=si #final specific entropy \n",
- "Pe=0.3 #final pressure in MPa\n",
- "print\"from steam table,various properties at final state are\"\n",
- "he=2780.2 #final specific heat of enthalpy in kJ/kg-K\n",
- "Te=159.1 #final temperature in celsius\n",
- "vi=30.0 #velocity with which steam enters the nozzle in m/s\n",
- "ve=((2*(hi-he)+(vi**2/1000))*1000)**0.5 #final velocity of steam with which it exits in m/s\n",
- "print\"\\n hence,exit velocity of the steam from the nozzle is\",round(ve),\"m/s\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "from steam table,various properties at final state are\n",
- "\n",
- " hence,exit velocity of the steam from the nozzle is 737.0 m/s\n"
- ]
- }
- ],
- "prompt_number": 9
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.2E:pg-339"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 2E\n",
- "#exit velocity of steam from nozzle\n",
- "\n",
- "hi=1279.1 #initial specific heat of enthalpy in Btu/lbm\n",
- "si=1.7085 #initial specific entropy in Btu/lbm R\n",
- "se=si #final specific entropy \n",
- "Pe=40 #final pressure in lbf/in^2\n",
- "he=1193.9 #final specific heat of enthalpy in Btu/lbm\n",
- "Te=314.2 #final temperature in F\n",
- "vi=100.0 #velocity with which steam enters the nozzle in ft/s\n",
- "ve=((2*((hi-he)+(vi**2/(32.17*778)))*(32.17*778)))**0.5 #final velocity of steam with which it exits in ft/s\n",
- "print\"\\n hence,exit velocity of the steam from the nozzle is\",round(ve),\"ft/s\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,exit velocity of the steam from the nozzle is 2070.0 ft/s\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.3:pg-340"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3\n",
- "#violation of second law\n",
- "\n",
- "print\"from R-134a tables\"\n",
- "se=1.7148 #specific entropy in final state in kJ/kg-K\n",
- "si=1.7395 #initial specific entropy in kJ/kg-K \n",
- "print\"therefore,se<si,whereas for this process the second law requires that se>=si.The process described involves a violation of the second law and thus would be impossible.\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "from R-134a tables\n",
- "therefore,se<si,whereas for this process the second law requires that se>=si.The process described involves a violation of the second law and thus would be impossible.\n"
- ]
- }
- ],
- "prompt_number": 10
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.4:pg-340"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4\n",
- "#calculating required specific work\n",
- "\n",
- "Cp=1.004 #specific heat of air at constant pressure in kJ/kg-K\n",
- "Ti=290 #initial temperature in kelvins\n",
- "Pi=100 #initial pressure in kPa\n",
- "Pe=1000 #final pressure in kPa\n",
- "k=1.4 \n",
- "Te=Ti*(Pe/Pi)**((k-1)/k) #final temperature in kelvins\n",
- "we=Cp*(Ti-Te) #required specific work in kJ/kg\n",
- "print\"\\n hence,specific work required is\",round(we),\"kJ/kg\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,specific work required is -271.0 kJ/kg\n"
- ]
- }
- ],
- "prompt_number": 12
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.4E:pg-341"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 4E\n",
- "#calculating required specific work\n",
- "\n",
- "Cp=0.24 #specific heat of air at constant pressure in Btu/lbm R\n",
- "Ti=520 #initial temperature in R\n",
- "Pi=14.7 #initial pressure in lbf/in^2\n",
- "Pe=147 #final pressure in lbf/in^2\n",
- "k=1.4 \n",
- "Te=Ti*(Pe/Pi)**((k-1)/k) #final temperature in R\n",
- "we=Cp*(Ti-Te) #required specific work in Btu/lbm\n",
- "print\"\\n hence,specific work required is\",round(we,2),\"Btu/lbm\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,specific work required is -116.15 Btu/lbm\n"
- ]
- }
- ],
- "prompt_number": 34
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.5:pg-342"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5\n",
- "#entropy generation\n",
- "\n",
- "h1=2865.54 #specific heat of enthalpy at state 1 in kJ/kg\n",
- "h2=83.94 #specific heat of enthalpy at state 2 in kJ/kg\n",
- "h3=2725.3 #specific heat of enthalpy at state 3 in kJ?kg\n",
- "s1=7.3115 #specific entropy at state 1 in kJ/kg-K\n",
- "s2=0.2966 #specific entropy at state 2 in kJ/kg-K\n",
- "s3=6.9918 #specific entropy at state 3in kJ/kg-K\n",
- "m1=2 #mass flow rate at state 1 in kg/s\n",
- "m2=m1*(h1-h3)/(h3-h2) #mass flow rate at state 2 in kg/s\n",
- "m3=m1+m2 #mass flow rate at state 3 in kg/s\n",
- "Sgen=m3*s3-m1*s1-m2*s2 #entropy generation in the process\n",
- "print\"\\n hence,entropy generated in this process is \",round(Sgen,3),\"kW/K\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,entropy generated in this process is 0.072 kW/K\n"
- ]
- }
- ],
- "prompt_number": 15
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.6:pg-344"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6\n",
- "#work required to fill the tank\n",
- "import math\n",
- "T1=17+273 #initial temperature of tank in Kelvins\n",
- "sT1=6.83521 #specific entropy in kJ/kg-K\n",
- "R=0.287 #gas constant in kJ/kg-K\n",
- "P1=100 #initial pressure in kPa\n",
- "P2=1000 #final pressure in kPa\n",
- "sT2=sT1+R*math.log(P2/P1) #specific entropy at temperature T2 in kJ/kg-K\n",
- "T2=555.7 #from interplotation \n",
- "V1=0.04 #volume of tank in m^3\n",
- "V2=V1 #final volume is equal to initial volume\n",
- "m1=P1*V1/(R*T1) #initial mass of air in tank in kg\n",
- "m2=P2*V2/(R*T2) #final mass of air in tank in kg\n",
- "Min=m2-m1 #in kg\n",
- "u1=207.19 #initial specific heat of enthalpy in kJ/kg\n",
- "u2=401.49 #final specific heat of enthalpy in kJ/kg\n",
- "hin=290.43 #in kJ/kg\n",
- "W12=Min*hin+m1*u1-m2*u2 #work required to fill the tank in kJ\n",
- "print\"\\n hence,the total amount of work required to fill the tank is\",round(W12,1),\"kJ\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,the total amount of work required to fill the tank is -31.9 kJ\n"
- ]
- }
- ],
- "prompt_number": 18
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.7:pg-347"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7\n",
- "#work required to pump water isentropically \n",
- "\n",
- "P1=100 #initial pressure in kPa\n",
- "P2=5000 #final pressure in kPa\n",
- "v=0.001004 #specific volume in m^3/kg\n",
- "w=v*(P2-P1) #work required to pump water isentropically\n",
- "print\"\\n hence,work required to pump water isentropically is \",round(w,2),\"kJ/kg\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,work required to pump water isentropically is 4.92 kJ/kg\n"
- ]
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.8:pg-348"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8\n",
- "#Velocity in exit flow\n",
- "\n",
- "print\"From Steam Tables, for liquid water at 20 C\"\n",
- "vf=0.001002 #in m^3/kg\n",
- "v=vf\n",
- "Pi=300 #Line pressure in kPa\n",
- "Po=100 #in kPa\n",
- "Ve=(2*v*(Pi-Po)*1000)**0.5 #velocity in the exit flow\n",
- "print\" \\n Hence, an ideal nozzle can generate upto \",round(Ve),\"m/s\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "From Steam Tables, for liquid water at 20 C\n",
- " \n",
- " Hence, an ideal nozzle can generate upto 20.0 m/s\n"
- ]
- }
- ],
- "prompt_number": 24
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.9:pg-351"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9\n",
- "#Rate of Entropy Generation\n",
- "\n",
- "print\"From R-410a tables,we get\"\n",
- "hi=280.6 #in kJ/kg\n",
- "he=307.8 #in kJ/kg\n",
- "si=1.0272 #in kJ/kg\n",
- "se=1.0140 #in kJ/kg\n",
- "m=0.08 #flow rate of refrigerant in kg/s\n",
- "P=3 #electrical power input in kW\n",
- "Qcv=m*(he-hi)-P #in kW\n",
- "To=30 #in Celsius\n",
- "Sgen=m*(se-si)-Qcv/(To+273.2) #rate of entropy generation \n",
- "print\"\\n Hence,the rate of entropy generation for this process is\",round(Sgen,5),\"kW/K\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "From R-410a tables,we get\n",
- "\n",
- " Hence,the rate of entropy generation for this process is 0.00166 kW/K\n"
- ]
- }
- ],
- "prompt_number": 29
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.10:pg-353"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 10\n",
- "#turbine efficiency\n",
- "\n",
- "hi=3051.2 #initial specific heat of enthalpy in kJ/kg\n",
- "si=7.1228 #initial specific entropy in kJ/kg-K\n",
- "sf=0.7548 #in kJ/kg-K\n",
- "sfg=7.2536 #in kJ/kg-K\n",
- "ses=si #final specific entropy is same as the initial\n",
- "xes=(si-sf)/sfg #quality of steam when it leaves the turbine\n",
- "hf=225.9 #in kJ/kg\n",
- "hfg=2373.1 #in kJ/kg\n",
- "hes=hf+xes*hfg #final specific heat of enthalpy in kJ/kg\n",
- "ws=hi-hes #work output of turbine calculated ideally in kJ/kg\n",
- "wa=600 #actual work output of turbine in kJ/kg\n",
- "nturbine=wa/ws #efiiciency of turbine \n",
- "print\"\\n hence,efficiency of the turbine is\",round(nturbine*100,1),\"%\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,efficiency of the turbine is 80.9 %\n"
- ]
- }
- ],
- "prompt_number": 32
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.11:pg-355"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 11\n",
- "#turbine inlet pressure\n",
- "import math\n",
- "hi=1757.3 #initial specific heat of enthalpy of air in kJ/kg\n",
- "si=8.6905 #initial specifc entropy of airin kJ/kg-K\n",
- "he=855.3 #final specific heat of enthalpy of air in kJ/kg\n",
- "w=hi-he #actual work done by turbine in kJ/kg\n",
- "n=0.85 #efficiency of turbine \n",
- "ws=w/n #ideal work done by turbine in kJ/kg\n",
- "hes=hi-ws #from first law of isentropic process\n",
- "Tes=683.7 #final temperature in kelvins from air tables\n",
- "ses=7.7148 #in kJ/kg-K\n",
- "R=0.287 #gas constant in kJ/kg-K\n",
- "Pi=100/math.e**((si-ses)/-R) #turbine inlet pressure in kPa\n",
- "print\"\\n hence,turbine inlet pressure is\",round(Pi),\"kPa\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,turbine inlet pressure is 2995.0 kPa\n"
- ]
- }
- ],
- "prompt_number": 36
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex9.12:pg-357"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12\n",
- "#required work input\n",
- "\n",
- "Pe=150.0 #final pressure of air in kPa\n",
- "Pi=100.0 #initial presure of air in kPa\n",
- "k=1.4\n",
- "Ti=300.0 #initial temperature of air in kelvis\n",
- "Tes=Ti*(Pe/Pi)**((k-1)/k) #from second law\n",
- "ws=1.004*(Ti-Tes) #from first law of isentropic process\n",
- "n=0.7 #efficiency of automotive supercharger \n",
- "w=ws/n #real work input in kJ/kg\n",
- "Te=Ti-w/1.004 #temperature at supercharger exit in K\n",
- "print\"\\n hence,required work input is \",round(w),\"kJ/kg\"\n",
- "print\"\\n and exit temperature is \",round(Te,1),\"K\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,required work input is -53.0 kJ/kg\n",
- "\n",
- " and exit temperature is 352.6 K\n"
- ]
- }
- ],
- "prompt_number": 44
- }
- ],
- "metadata": {}
- }
- ]
-} \ No newline at end of file