{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 10: The Pvt relationships" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 10.1: Pressure_calculations.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "\n", "clc\n", "clear\n", "//Initialization of variables\n", "m=1 //lbm\n", "T1=212+460 //R\n", "sv=0.193 //ft^3/lbm\n", "M=44\n", "a=924.2 //atm ft^2 /mole^2\n", "b=0.685 //ft^3/mol\n", "R=0.73 //atm ft^3/R mol\n", "//calculations\n", "v=sv*M\n", "p=R*T1/v\n", "p2=R*T1/(v-b) -a/v^2\n", "//results\n", "disp('For ideal gas case, Table B-6 and for vanderwaals case, Table B-8 have been used')\n", "printf('\n In vanderwaals equation, pressure = %.1f atm',p2)\n", "printf('\n In ideal gas case, pressure = %.1f atm',p)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 10.2: volume_calculatio.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "//Initialization of variables\n", "m=1 //lbm\n", "p=50.9 //atm\n", "t=212+460 //R\n", "R=0.73\n", "//calculations\n", "pc=72.9 //atm\n", "tc=87.9 +460 //R\n", "pr=p/pc\n", "Tr=t/tc\n", "z=0.88\n", "v=z*R*t/p\n", "//results\n", "printf('volume = %.3f ft^3/mole',v)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 10.3: Pressure_calculations.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "clc\n", "clear\n", "//Initialization of variables\n", "t=212+460 //R\n", "v=0.193 //ft^3/lbm\n", "M=44\n", "R=0.73\n", "//calculations\n", "tc=87.9+460 //F\n", "zc=0.275\n", "vc=1.51 //ft^3/mol\n", "tr=t/tc\n", "vr=v*M/vc\n", "vrd=vr*zc\n", "z=0.88\n", "p=z*R*t/(M*v)\n", "//results\n", "printf('Pressure = %.1f atm',p)" ] } ], "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 }