{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 11: Real Gas" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 11.1: Calculate_the_specific_volume_of_propane.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "printf('Example 11.1 | Page number 394 \n\n');\n", "//Calculate specific volume of propane and ideal gas\n", "//Given data\n", "P = 70e5 //Pa\n", "T = 150 + 273 //K\n", "Z = 0.55 //Compressibility factor\n", "R = 8314.3/44 //J/kgK\n", "//Solution\n", "//For propane\n", "v = Z*R*T/P //m^3/kg\n", "printf('Specific volume for propane = %.6f m^3/kg\n',v)\n", "//ideal gas\n", "v = R*T/P //m^3/kg\n", "printf('Specific volume for ideal gas = %.6f m^3/kg',v)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 11.2: Find_the_reduced_properties_of_air.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "printf('Example 11.2 | Page number 396 \n\n');\n", "//Find reduced properties for air at 10 bar, 27°C\n", "//Given data\n", "Z = 1.04 //Compressiblity factor\n", "pc = 3.77e6 //Pa //crticial pressure\n", "Tc = 132.5 //K\n", "vc = 0.0883 //m^3/kmol\n", "p = 10e5 //Pa\n", "T = 300 //K\n", "//Solution\n", "R = 287 //J/kgK\n", "pR = p/pc //reduced pressure\n", "TR = T/Tc //reduced temperature\n", "v = Z*R*T/p //m^3/kg\n", "vR = v/vc //reduced volume\n", "\n", "printf('Reduced pressure = %.5f \n',pR)\n", "printf('Reduced temperature = %.5f \n',TR)\n", "printf('Reduced volume = %.5f \n',vR)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 11.3: At_what_temperature_and_pressure_steam_be_similar_to_air.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "printf('Example 11.3 | Page number 397 \n\n');\n", "//Find temperature and pressure at which steam will beahve similar to air\n", "//Given Data\n", "pR = 0.26525 //reduced pressure\n", "TR = 2.26415 //reduced temperature\n", "pc = 22.09 //bar //critical pressure of water\n", "Tc = 647.3 //K //critical temperature of water\n", "//Solution\n", "p = pR*pc //bar\n", "T = TR*Tc //K\n", "printf('Temperature at which steam would beahve similar to air at 10 bar and 27°C = %.1f K\n',T)\n", "\n", "printf('Pressure at which steam would beahve similar to air at 10 bar and 27°C = %.2f bar\n',p)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 11.4: Find_Z_for_air.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "printf('Example 11.4 | Page number 399 \n\n');\n", "//Find Z for air at 5.65 MPa and 27°C\n", "//Given data\n", "pc = 3.77e6 //Pa //critical pressure\n", "p = 5.65e6 //Pa\n", "Tc = 132.5 //K //critical temperature\n", "T = 300 //K\n", "\n", "//Solution\n", "pR = p/pc //reduced pressure\n", "TR = T/Tc //reduced temperature\n", "//from generalized compressibilty chart\n", "Z =0.97\n", "printf('From the generalized compressiblity chart, at reduced pressure of %.1f and reduced temperature of %.2f, Z = %.2f',pR,TR,Z)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 11.5: Calculate_specific_volume_of_gaseous_propane.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "printf('Example 11.5 | Page number 399 \n\n');\n", "//Calculate specific volume for gaseous propane using:\n", "//(i) ideal gas equation\n", "//(ii) generalized compressiblity chart\n", "//Given data\n", "T =150+273 //K\n", "p = 7e6 //Pa\n", "\n", "//Part (i)\n", "printf('Part(i)\n')\n", "v = (8314.3/44)*T/p //m^3/kg\n", "printf('Specific volume for gaseous propane using ideal gas equation = %.4f m^3/kg\n\n',v)\n", "\n", "//Part(ii)\n", "printf('Part(ii)\n')\n", "pc = 4.26e6 //Pa //critical pressure\n", "Tc = 370 //K //critical temperature\n", "\n", "pR = p/pc //reduced pressure\n", "TR = T/Tc //reduced temperature\n", "Z = 0.56 //compressibility factor\n", "printf('From the generalized compressiblity chart, at reduced pressure of %.1f and reduced temperature of %.2f, Z = %.2f\n',pR,TR,Z)\n", "v = Z*v\n", "printf('Specific volume for gaseous propane using generalized compressiblity chart = %.5f m^3/kg\n\n',v)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 11.6: Determine_the_pressure_exerted_by_Carbon_dioxide.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "printf('Example 11.6 | Page number 404 \n\n');\n", "//Find pressure exerted using (i) ideal gas equation of state (ii) van der Waals equation of state\n", "//Given data\n", "m = 5//kg //mass of CO2\n", "T = 300 //K\n", "R = 8314.3/44 //J/kgK\n", "V = 1.5 //m^3\n", "\n", "//Part(i)\n", "printf('Part(i)\n')\n", "p = m*R*T/V\n", "printf('Pressure exerted by CO2(using ideal gas equation) = %.2f kPa\n\n',p*.001)\n", "\n", "//Part(ii)\n", "printf('Part(ii)\n')\n", "R = 8.3143 //J/kmolK\n", "a = 0.3658e3 //kPam^6/kmol^2\n", "b = 0.0428 //m^3.kmol\n", "v = 44*V/m //m^3/kmol\n", "p = T*R/(v-b) - a/v^2\n", "printf('Pressure exerted by CO2(using van der Waals equation) = %.1f kPa\n\n',p)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 11.7: Determine_the_pressure_in_rigid_vessel.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "printf('Example 11.7 | Page number 406 \n\n');\n", "//Determine the pressure using:\n", "//(i) ideal gas equation of state\n", "//(ii) generalised compressibility chart\n", "//(iii) van der Waals equation\n", "//(iv) Redlich-Kwong equation of state\n", "//(v) Bettie-Bridgeman equation\n", "\n", "//Given Data\n", "M = 28 //g/mol\n", "m = 3.5//kg\n", "V = 0.015 //m^3\n", "v = V/m //m^3/kg\n", "T = 473 //K\n", "R = 8314.3/M //J/kgK\n", "//Solution\n", "\n", "//Part(i)\n", "printf('Part(i)\n')\n", "p = m*R*T/V //Pa\n", "printf('Pressure (using ideal gas equation of state) = %.2f MPa\n\n',p*(1e-6))\n", "\n", "//Part(ii)\n", "printf('Part(ii)\n')\n", "pc = 3.39e6 //Pa //critical pressure\n", "Tc = 126.2 //K //critical temperature\n", "vc = 0.0899 //m^3/kmol //critical volume\n", "\n", "TR = T/Tc //reduced temperature\n", "vR = v/(R*Tc/pc) //reduced volume\n", "Z = 1.1 //Compressibility factor\n", "printf('From the generalized compressiblity chart, at reduced volume of %.4f and reduced temperature of %.2f, Z = %.2f\n',vR,TR,Z)\n", "p = Z*R*T/v //Pa\n", "printf('Pressure (using generalised compressibility chart) = %.3f MPa\n\n',p*(1e-6))\n", "\n", "//Part(iii)\n", "printf('Part(iii)\n')\n", "a = 0.1366e6 //Pam^5/kmol^2\n", "b = 0.0386 //m^3/kmol\n", "p = (8314.3*T/(v*M - b)) - a/(v*M)^2\n", "printf('Pressure (using van der Waals equation) = %.2f MPa\n\n',p*(1e-6))\n", "\n", "//Part(iv)\n", "printf('Part(iv)\n')\n", "a = (0.427*(R*M)^2*Tc^2.5/pc)\n", "b = 0.0866*(R*M*Tc/pc)\n", "\n", "p = (R*M*T/(v*M-b))-(a/(((v*M)^2 + v*M*b)*(T^0.5)))\n", "printf('Pressure (using Redlich-Kwong equation of state) = %.2f MPa\n\n',p*(1e-6))\n", "\n", "//---Note--- //Solution to Part(iv) in the textbook is 40.58 MPa which is wrong. The correct solution (38.13 MPa) is computed here.\n", "\n", "//Part(v)\n", "printf('Part(v)\n')\n", "A0 = 136.2315\n", "a = 0.02617\n", "B0 = 0.05046\n", "b = -0.00691\n", "c = 42000\n", "\n", "A = A0*(1 - a/(v*M))\n", "B = B0*(1 - b/(v*M))\n", "eps = c/(T^3 * v*M)\n", "p = ((8314.3)*T*(1-eps)*(v*M+B))/(v*M)^2 - 1e3*A/(v*M)^2\n", "printf('Pressure (using ideal gas equation of state) = %.2f MPa\n\n',p*(1e-6))" ] } ], "metadata": { "kernelspec": { "display_name": "Scilab", "language": "scilab", "name": "scilab" }, "language_info": { "file_extension": ".sce", "help_links": [ { "text": "MetaKernel Magics", "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" } ], "mimetype": "text/x-octave", "name": "scilab", "version": "0.7.1" } }, "nbformat": 4, "nbformat_minor": 0 }