{ "metadata": { "name": "", "signature": "sha256:6916c81bc8c1ac256991650a35c94801d5197d3ce593f7738220895278cf5f8b" }, "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.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.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 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }