summaryrefslogtreecommitdiff
path: root/Fundamentals_Of_Thermodynamics/Chapter3_6.ipynb
diff options
context:
space:
mode:
authorThomas Stephen Lee2015-09-04 22:04:10 +0530
committerThomas Stephen Lee2015-09-04 22:04:10 +0530
commit41f1f72e9502f5c3de6ca16b303803dfcf1df594 (patch)
treef4bf726a3e3ce5d7d9ee3781cbacfe3116115a2c /Fundamentals_Of_Thermodynamics/Chapter3_6.ipynb
parent9c9779ba21b9bedde88e1e8216f9e3b4f8650b0e (diff)
downloadPython-Textbook-Companions-41f1f72e9502f5c3de6ca16b303803dfcf1df594.tar.gz
Python-Textbook-Companions-41f1f72e9502f5c3de6ca16b303803dfcf1df594.tar.bz2
Python-Textbook-Companions-41f1f72e9502f5c3de6ca16b303803dfcf1df594.zip
add/remove/update books
Diffstat (limited to 'Fundamentals_Of_Thermodynamics/Chapter3_6.ipynb')
-rwxr-xr-xFundamentals_Of_Thermodynamics/Chapter3_6.ipynb571
1 files changed, 0 insertions, 571 deletions
diff --git a/Fundamentals_Of_Thermodynamics/Chapter3_6.ipynb b/Fundamentals_Of_Thermodynamics/Chapter3_6.ipynb
deleted file mode 100755
index 64998280..00000000
--- a/Fundamentals_Of_Thermodynamics/Chapter3_6.ipynb
+++ /dev/null
@@ -1,571 +0,0 @@
-{
- "metadata": {
- "name": "",
- "signature": "sha256:b6e51b20af9aaa1b32972245e7dbe7cc42b3ed40e5f3cbf6db8837625a12aebc"
- },
- "nbformat": 3,
- "nbformat_minor": 0,
- "worksheets": [
- {
- "cells": [
- {
- "cell_type": "heading",
- "level": 1,
- "metadata": {},
- "source": [
- "Chapter3:PROPERTIES OF A PURE SUBSTANCE"
- ]
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.1:pg-57"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 1\n",
- "#determinig the phase of water\n",
- "\n",
- "print\"from the table,we find that at 120C,saturation pressure of water is 198.5 kPa.But here we have pressure of 500 kPa.hence,water exists as a compressed liquid here.\"\n",
- "print\"also at 120C,vf=0.00106 kg/m^3 and vg=0.89186 kg/m^3.given v=0.5 m^3/kg i.e. vf<v<vg,so we have two phase mixture of liquid and vapor.\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "from the table,we find that at 120C,saturation pressure of water is 198.5 kPa.But here we have pressure of 500 kPa.hence,water exists as a compressed liquid here.\n",
- "also at 120C,vf=0.00106 kg/m^3 and vg=0.89186 kg/m^3.given v=0.5 m^3/kg i.e. vf<v<vg,so we have two phase mixture of liquid and vapor.\n"
- ]
- }
- ],
- "prompt_number": 2
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.2:pg-58"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 2\n",
- "#determinig the phase \n",
- "\n",
- "print\"from the table,we find that at 30C,saturation pressure of ammonia is 1167 kPa.But here we have pressure of 1000 kPa.hence,ammonia exists in superheated vapor state.\"\n",
- "print\"for R-22 at 200 kPa,vg=0.1119 kg/m^3.given v=0.15 m^3/kg i.e. v>vg,so the state is superheated vapor\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "from the table,we find that at 30C,saturation pressure of ammonia is 1167 kPa.But here we have pressure of 1000 kPa.hence,ammonia exists in superheated vapor state.\n",
- "for R-22 at 200 kPa,vg=0.1119 kg/m^3.given v=0.15 m^3/kg i.e. v>vg,so the state is superheated vapor\n"
- ]
- }
- ],
- "prompt_number": 3
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.3:pg-59"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 3\n",
- "#determining the quality and specific volume\n",
- "\n",
- "v1=0.5 #given specific volume in m^3/kg\n",
- "vf=0.001073 #specific volume when only liquid phase is present in m^3/kg\n",
- "vfg=0.60475 #in m^3/kg\n",
- "x=(v1-vf)/vfg #quality\n",
- "print\"For water at a pressure of 300 kPa,the state at which v1 is 0.5 m^3/kg is seen to be in the liquid-vapor two-phase region,at which T=133.6 C and the quality is\",round(x,3)\n",
- "\n",
- "v2=1 #given specific volume in m^3/kg\n",
- "\n",
- " # using the method of interplotation\n",
- "T=((400-300)*(1.0-0.8753))/(1.0315-0.8753)+300 #temperature of the water\n",
- "print\"For water at a pressure of 300 kPa,the state at which v2 is 1 m^3/kg is seen to be in the liquid-vapor two-phase region,the temperature is\",round(T,1)"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "For water at a pressure of 300 kPa,the state at which v1 is 0.5 m^3/kg is seen to be in the liquid-vapor two-phase region,at which T=133.6 C and the quality is 0.825\n",
- "For water at a pressure of 300 kPa,the state at which v2 is 1 m^3/kg is seen to be in the liquid-vapor two-phase region,the temperature is 379.8\n"
- ]
- }
- ],
- "prompt_number": 13
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.4:pg-60"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- " #example 4\n",
- "#percentage of vapor \n",
- "\n",
- "vliq=0.1 #volume of saturated liquid in m^3\n",
- "vf=0.000843 #in m^3/kg\n",
- "vvap=0.9 #volume of saturated vapor R-134a in equilbrium\n",
- "vg=0.02671 #in m^3/kg\n",
- "mliq=vliq/vf #mass of liquid in kg \n",
- "mvap=vvap/vg #mass of vapor in kg\n",
- "m=mliq+mvap #total mass in kg\n",
- "x=mvap*100/m #percentage of vapor on mass basis\n",
- "print\"hence,% vapor on mass basis is\",round(x,1),\"%\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "hence,% vapor on mass basis is 22.1 %\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.4E:pg-60"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- " #example 5\n",
- "#percentage of vapor \n",
- "\n",
- "vliq=0.1 #volume of saturated liquid in ft^3\n",
- "vf=0.0136 #in ft^3/lbm\n",
- "vvap=0.9 #volume of saturated vapor R-134a in equilbrium\n",
- "vg=0.4009 #in ft^3/lbm\n",
- "mliq=vliq/vf #mass of liquid in lbm \n",
- "mvap=vvap/vg #mass of vapor in lbm\n",
- "m=mliq+mvap #total mass in lbm\n",
- "x=mvap*100/m #percentage of vapor on mass basis\n",
- "print\"hence,% vapor on mass basis is\",round(x,1),\"%\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "hence,% vapor on mass basis is 23.4 %\n"
- ]
- }
- ],
- "prompt_number": 1
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.5:pg-61"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5\n",
- "#calculating pressure after heat addition\n",
- "\n",
- "v1=0.14922 #specific volume of sautrated ammonia in m^3/kg\n",
- "print\"Since the volume does not change during the process,the specific volume remains constant.therefore\"\n",
- "v2=v1 #in m^3/kg\n",
- "print\"Since vg at 40C is less than v2,it is evident that in the final state the Ammonia is superheated vapor.By interplotation,we find that\"\n",
- "P2=945 #final pressure in kPa\n",
- "print\"hence,the final pressure is 945 kPa\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Since the volume does not change during the process,the specific volume remains constant.therefore\n",
- "Since vg at 40C is less than v2,it is evident that in the final state the Ammonia is superheated vapor.By interplotation,we find that\n",
- "hence,the final pressure is 945 kPa\n"
- ]
- }
- ],
- "prompt_number": 7
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.5E:pg-61"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 5\n",
- "#calculating pressure after heat addition\n",
- "\n",
- "v1=2.311 #specific volume of sautrated ammonia in ft^3/lbm\n",
- "print\"Since the volume does not change during the process,the specific volume remains constant.therefore\"\n",
- "v2=v1 #in ft^3/lbm\n",
- "print\"Since vg at 120f is less than v2,it is evident that in the final state the Ammonia is superheated vapor.By interplotation,we find that\"\n",
- "P2=145 #final pressure in lbf/in^2\n",
- "print\"hence,the final pressure is 145 lbf/in^2\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "Since the volume does not change during the process,the specific volume remains constant.therefore\n",
- "Since vg at 120f is less than v2,it is evident that in the final state the Ammonia is superheated vapor.By interplotation,we find that\n",
- "hence,the final pressure is 145 lbf/in^2\n"
- ]
- }
- ],
- "prompt_number": 8
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.6:pg-61"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 6\n",
- "#Determinig the missing property\n",
- "\n",
- "T1=273-53.2 #given temperature in K\n",
- "P1=600 #given pressure in kPa\n",
- "print\"This temperature is higher than the critical temperature (critical temp. at P=600 kPa) is 96.37 K.Hence,v=0.10788 m^3/kg\"\n",
- "T2=100 #given temp. in K\n",
- "v2=0.008 #given specific volume in m^3/kg\n",
- "vf=0.001452 #in m^3/kg\n",
- "vg=0.0312 #in m^3/kg\n",
- "Psat=779.2 #saturation pressure in kPa\n",
- "vfg=vg-vf #in m^3/kg\n",
- "x=(v2-vf)/vfg #quality\n",
- "print\"\\n hence, the pressure is\",round(Psat,1),\"kPa\"\n",
- "print\"\\n and quality is\",round(x,4),\"%\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "This temperature is higher than the critical temperature (critical temp. at P=600 kPa) is 96.37 K.Hence,v=0.10788 m^3/kg\n",
- "\n",
- " hence, the pressure is 779.2 kPa\n",
- "\n",
- " and quality is 0.2201 %\n"
- ]
- }
- ],
- "prompt_number": 19
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.7:pg-62"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 7\n",
- "#determining the pressure of water\n",
- "\n",
- "vg=0.12736 #specific volume in m^3/kg for water at 200C\n",
- "v=0.4 #specific volume in m^3/kg\n",
- "P1=500 #in kPa\n",
- "v1=0.42492 #specific volume at P1 in m^3/kg\n",
- "P2=600 #in kPa\n",
- "v2=0.35202 #specific volume at P2 in m^3/kg\n",
- "P=P1+(P2-P1)*(v-v1)/(v2-v1) #calculating pressure by interplotation\n",
- "print \"hence,the pressure of water is\",round(P,1),\" kPa\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- " hence,the pressure of water is 534.2 kPa\n"
- ]
- }
- ],
- "prompt_number": 21
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.8:pg-66"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 8\n",
- "#calculating mass of air\n",
- "\n",
- "P=100 #pressure in kPa\n",
- "V=6*10*4 #volume of room in m^3\n",
- "R=0.287 #in kN-m/kg-K\n",
- "T=25 #temperature in Celsius\n",
- "m=P*V/(R*(T+273.1)) #mass of air contained in room\n",
- "print\"\\n hence, mass of air contained in room is\",round(m,1),\"kg\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence, mass of air contained in room is 280.5 kg\n"
- ]
- }
- ],
- "prompt_number": 27
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.9:pg-67"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 9\n",
- "#calculating pressure inside tank\n",
- "\n",
- "V=0.5 #volumr of tank in m^3\n",
- "m=10 #mass of ideal gas in kg\n",
- "T=25 #temperature of tank in Celsius\n",
- "M=24 #molecular mass of gas in kg/kmol\n",
- "Ru=8.3145 #universal gas constant in kN-m/kmol-K\n",
- "R=Ru/M #gas constant for given ideal gas in kN-m/kg-K\n",
- "P=m*R*(T+273.2)/V #pressure inside tank\n",
- "print\"\\n hence,pressure inside tank is\",round(P),\"kpa\" "
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,pressure inside tank is 2066.0 kpa\n"
- ]
- }
- ],
- "prompt_number": 30
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.10:pg-67"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 10\n",
- "#mass flow rate\n",
- "\n",
- "dt=185 #time period in seconds over which there is incrrease in volume \n",
- "dV=0.75 #increase in volume in 0.75 in m^3\n",
- "V=dV/dt #volume flow rate in m^3/s\n",
- "P=105 #pressure inside gas bell kPa\n",
- "T=21 #temperature in celsius\n",
- "R=0.1889 #ideal gas constant in kJ/kg-K\n",
- "m=P*V/(R*(T+273.15)) #mass flow rate of the flow in kg/s\n",
- "print\"\\n hence,mass flow rate is\",round(m,5),\"kg/s\"\n",
- "print\"\\n and volume flow rate is\",round(V,5),\"m^3/s\"\n",
- "#The answer of volume flow rate in the book is wrong."
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,mass flow rate is 0.00766 kg/s\n",
- "\n",
- " and volume flow rate is 0.00405 m^3/s\n"
- ]
- }
- ],
- "prompt_number": 40
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.12:pg-71"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 12\n",
- "#determining specific using diffenet laws\n",
- "\n",
- "T=100.0 #given temp.in 100 celsius\n",
- "P=3.0 #given pressure in MPa\n",
- "v1=0.0065 #specific volume in m^3/kg using table\n",
- "print\"\\n hence,the specific volume for R-134a using R-134a tables is\",round(v1,3),\"m^3/kg\"\n",
- "M=102.3 #molecular mass in kg\n",
- "R=8.3145 #in kJ/K\n",
- "Ru=R/M #in kJ/K-kg\n",
- "v2=Ru*(T+273)/(P*1000) #specific volume assuming R-134a to be ideal gas in m^3/kg\n",
- "print\"\\n hence,the specific volume for R-134a using R-134a the ideal gas laws is\",round(v2,5),\"m^3/kg\"\n",
- "Tr=373.2/374.2 #reduced temperature using generalized chart\n",
- "Pr=3.0/4.06 #reduced pressure using generalized chart\n",
- "Z=0.67 #compressibility factor \n",
- "v3=Z*v2 # specific volume using generalized chart in m^3/kg\n",
- "print\"\\n hence,the specific volume for R-134a using the generalized chart is\",round(v3,5),\"m^3/kg\"\n"
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,the specific volume for R-134a using R-134a tables is 0.006 m^3/kg\n",
- "\n",
- " hence,the specific volume for R-134a using R-134a the ideal gas laws is 0.01011 m^3/kg\n",
- "\n",
- " hence,the specific volume for R-134a using the generalized chart is 0.00677 m^3/kg\n"
- ]
- }
- ],
- "prompt_number": 51
- },
- {
- "cell_type": "heading",
- "level": 2,
- "metadata": {},
- "source": [
- "Ex3.13:pg-71"
- ]
- },
- {
- "cell_type": "code",
- "collapsed": false,
- "input": [
- "#example 13\n",
- "#calculating mass of gas\n",
- "\n",
- "Pc=4250 #critical pressure of propane in kPa\n",
- "Tc=369.8 #critical temperature in K\n",
- "T=15 #temperature of propane in celsius\n",
- "Tr=T/Tc #reduced temperature\n",
- "Prsat=0.2 # reduced pressure \n",
- "P=Prsat*Pc #pressure in kPa\n",
- "x=0.1 #given quality\n",
- "Zf=0.035 #from graph\n",
- "Zg=0.83 #from graph\n",
- "Z=(1-x)*Zf+x*Zg #overall compressibility factor\n",
- "V=0.1 #volume of steel bottle in m^3\n",
- "R=0.1887 #in kPa-m^3/kg-K\n",
- "m=P*V/(Z*R*(T+273)) #total propane mass in kg\n",
- "print\"\\n hence,the total propane mass is\",round(m,2),\"kg\"\n",
- "print\"\\n and pressure is\",round(P,2),\"kPa\""
- ],
- "language": "python",
- "metadata": {},
- "outputs": [
- {
- "output_type": "stream",
- "stream": "stdout",
- "text": [
- "\n",
- " hence,the total propane mass is 13.66 kg\n",
- "\n",
- " and pressure is 850.0 kPa\n"
- ]
- }
- ],
- "prompt_number": 44
- }
- ],
- "metadata": {}
- }
- ]
-} \ No newline at end of file