{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 3: Properties of Pure Substances" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3-1 ,Page No.128" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given values\n", "m=50;#mass in kg\n", "T=90;#temperature in C\n", "\n", "#Values from Table A-4\n", "P=70.183;#in kPa\n", "v=0.001036;#in m^3/kg\n", "\n", "#Calculation\n", "V=m*v;#equating dimensions\n", "print'pressure is %f kPa'%round(P,3);\n", "print'total volumne of tank becomes %f m^3'%round(V,4)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "pressure is 70.183000 kPa\n", "total volumne of tank becomes 0.051800 m^3\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3-2 ,Page No.128" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given values\n", "V=2.0;#volumne of saturated water vapor in ft^3\n", "P=50.0;#pressure in psia\n", "\n", "#Values from Table A-5E\n", "T=280.99;#in F\n", "v=8.5175;#in ft^3/lbm\n", "\n", "#caluclation\n", "m=V/v;#dimension analysis\n", "print'Temperature inside cylinder %f F'%round(T,2);\n", "print'mass of vapour inside cylinder %f lbm'%round(m,3);\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Temperature inside cylinder 280.990000 F\n", "mass of vapour inside cylinder 0.235000 lbm\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3-3 ,Page No.128" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Constants used\n", "Hfg=2257.5;#enthalpy of vaporization in kJ/kg\n", "\n", "#Given values\n", "m=200.0/1000;#mass converting in kg\n", "P=100;#Pressure at which process takes place in kPa\n", "\n", "#Values from Table A-5\n", "vg=1.6941;#specific vol of sat liq\n", "vf=0.001043;#specific vol of vapor\n", "\n", "#Caluclation\n", "vfg=vg-vf;\n", "V=m*vfg;\n", "print'the volume change %f m^3'%round(V,4);\n", "E=m*Hfg;\n", "print'amount of energy transferred to the water %f kJ'%round(E,1)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the volume change 0.338600 m^3\n", "amount of energy transferred to the water 451.500000 kJ\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3-4 ,Page No.131" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given values\n", "mt=10#mass of water in kg\n", "mf=8;#mass of water in liquid form in kg\n", "T=90;#temperature in C\n", "\n", "#Values from Table A-4\n", "P=70.183;#in kPa\n", "vf=0.001036;#in m^3\n", "vg=2.3593;#in m^3\n", "\n", "#Caluclation\n", "mg=mt-mf;\n", "V=mf*vf+mg*vg;# V= Vg + Vf\n", "print'the volume of the tank %f m^3'%round(V,2);\n", "print'the pressure in the tank %f kPa'%round(P,3)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the volume of the tank 4.730000 m^3\n", "the pressure in the tank 70.183000 kPa\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3-5 ,Page No.131" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given values\n", "m=4;#mass of refrigerant-134a in kg\n", "V=80.0/1000;#volumne converting into m^3\n", "P=160;#pressure in kPa\n", "\n", "#Values from Table A-12\n", "vf=0.0007437;\n", "vg=0.12348;\n", "T=-15.60;\n", "hf=31.21;\n", "hfg=209.90;\n", "\n", "#Caluclations\n", "v=V/m;\n", "#vg>v>vf therefore it is a saturated mix\n", "#hence temp will same as saturation temp\n", "print'the temperature %f celcius'%round(T,2)\n", "x=(v-vf)/(vg-vf);#x=vg/vfg i.e the dryness fraction\n", "print'the quality is %f'%round(x,3);\n", "h=hf+x*hfg;\n", "print'the enthalpy of the refrigerant %f kJ/kg'%round(h,1);\n", "mg=x*m;\n", "Vg=mg*vg;\n", "print'the volume occupied by the vapor phase %f m^3'%round(Vg,4)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "the temperature -15.600000 celcius\n", "the quality is 0.157000\n", "the enthalpy of the refrigerant 64.100000 kJ/kg\n", "the volume occupied by the vapor phase 0.077500 m^3\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3-7 ,Page No.133" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given values\n", "P=0.5;#pressure in MPa\n", "h=2890.0;#enthaply in kJ/kg\n", "\n", "#from Table A\u20136\n", "#at P=0.5 MPa\n", "T1=200.0;\n", "h1=2855.8;\n", "T2=250;\n", "h2=2961.0;\n", "# we need linear interpolation \n", "\n", "#calculatiom\n", "#by interpolation we can say that\n", "#h=h1+(T-T1)/(T2-T1)*(h2-h1)\n", "#we have to find T\n", "T=(h-h1)/(h2-h1)*(T2-T1)+T1;\n", "print'temperature of water %f celcius'%round(T,1)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "temperature of water 216.300000 celcius\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3-8 ,Page No.134" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given values\n", "T=80;#temperature of compressed liquid water in C\n", "P=5;#pressure in KPa\n", "\n", "#from Table A\u20137\n", "#at compressed liq given conditions\n", "u=333.82;\n", "\n", "#from Table A-4\n", "#at saturation\n", "usat=334.97;\n", "\n", "#calcualtion\n", "e=(usat-u)/u*100;\n", "print'internal energy of compressed liquid water using data from the compressed liquid table %f kJ/kg '%round(u,2);\n", "print'internal energy of compressed liquid water using saturated liquid data %f kJ/kg '%round(usat,2);\n", "print'the error involved %f the second case'%round(e,2)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "internal energy of compressed liquid water using data from the compressed liquid table 333.820000 kJ/kg \n", "internal energy of compressed liquid water using saturated liquid data 334.970000 kJ/kg \n", "the error involved 0.340000 the second case\n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3-9 ,Page No.135" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#part a\n", "print('Part a');\n", "\n", "#given values\n", "P=200;#in KPa\n", "x=0.6;\n", "\n", "#from Table A-5\n", "T=120.21;\n", "uf=504.50;\n", "ufg=2024.6;\n", "\n", "#calcualtions\n", "u=uf+(x*ufg);\n", "print'temperature %f Celcius '%round(T,2);\n", "print'internal energy %f kJ/kg'%round(u,2);\n", "print('saturated liquid\u2013vapor mixture at a pressure of 200 kPa');\n", "\n", "#part b\n", "print('Part b');\n", "\n", "#given values\n", "T=125;#in C\n", "u=1600;#in kJ/kg\n", "\n", "#from Table A\u20134\n", "uf=524.83;\n", "ug=2534.3;\n", "#ug>u>ufg so its aturated liquid\u2013vapor mixture\n", "P=232.23;\n", "\n", "#calculation\n", "ufg=ug-uf;\n", "x=(u-uf)/ufg;\n", "print'Pressure %f kPa'%round(P,2);\n", "print'x is %f'%round(x,3);\n", "print('saturated liquid\u2013vapor mixture at a temp of 125 of celcius');\n", "\n", "#part c\n", "print('Part c');\n", "\n", "#given values\n", "P=1000;#in kPa\n", "u=2950;#in kJ/kg\n", "\n", "#from Table A\u20136\n", "uf=761.39;\n", "ug=2582.8;\n", "#u>ug so its superheated steam\n", "T=395.2;\n", "\n", "#calculation\n", "print'temperature %f Celcius'%round(T,1);\n", "print('superheated vapor at 1MPa');\n", "\n", "#part d\n", "print('Part d');\n", "\n", "#given values\n", "T=75;#in C\n", "P=100;#in kPa\n", "\n", "#from Table A\u20135\n", "Tsat=151.83;\n", "#T