{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 5 : Vapor Pressure The Clapeyron Equation And Single Pure Chemical Species Phase Equilibrium" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 5.1 Page: 89" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "\n", "\n", "T=212. # [F]\n", "\n", "delta_h=970.3 #[Btu/lbm]\n", "delta_v=26.78 #[ft**(3)/lbm] and\n", "\n", "delta_h1=delta_h*778 #[ft*lbf/lbm]\n", "delta_v1=delta_v*144 #[ft*in**(2)/lbm]\n", "T=671.7 #[R]\n", "\n", "dP_by_dT=delta_h1/(T*delta_v1) #[psi/R]\n", "\n", "print \"The value of dP/dT is %f psi/R\"%(dP_by_dT)\n", ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of dP/dT is 0.291432 psi/R\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 5.2 Page: 90\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "\n", "p_2=0.005 # [psia]\n", "R=1.987/18. #[1/R]\n", "\n", "T_1=460+32.018 #[R]\n", "p_1=0.0887 #[psia]\n", "\n", "delta_H=1218.7 #[Btu/lbm]\n", "\n", "T_2=1/(1/T_1-(math.log(p_2/p_1))*R/delta_H) #[R]\n", "T_2F=T_2-460 #[F]\n", "\n", "print \"The temperature is %.2f F\"%(T_2F)\n", ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The temperature is -23.88 F\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 5.3 Page: 91\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "\n", "import math \n", "from numpy import *\n", "\n", "T_3=1155.2 #[R]\n", "T_2=652.9 #[R]\n", "T_1=787.5 #[R]\n", "p_2=10. #[psia]\n", "p_1=100. #[psia]\n", "\n", "\n", "\n", "M = matrix([[1, -1/652.9],[1,-1/787.5]])\n", "C = array([[math.log(10)],[math.log(100)]])\n", "X = linalg.inv(M) * C\n", "\n", "A=X[0]\n", "B=X[1]\n", "\n", "p_3=math.exp(A-B/T_3)\n", "\n", "print \"Vapuor pressure of water at given temperature is %f psia\"%(p_3)\n", "\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Vapuor pressure of water at given temperature is 3499.187053 psia\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 5.4 Page: 94\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "\n", "Pr=0.023\n", "\n", "w=-math.log10(0.023)-1\n", "\n", "print \"The accentric factor based on the given data is %f\"%(w)\n", ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The accentric factor based on the given data is 0.638272\n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 5.5 Page: 94\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "\n", "A=7.96681\n", "B=1668.21\n", "C=228.0\n", "p=760. #[torr]\n", "\n", "T=B/(A-math.log10(p))-C\n", "\n", "print \"NBP of water umath.sing antoine equation and table A.2 is %f C\"%(T)\n", "\n", ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "NBP of water umath.sing antoine equation and table A.2 is 100.000625 C\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ " Example 5.6 Page: 96\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "\n", "T_2=-22. #[C]\n", "T_2F=T_2*9/5+32 #[F]\n", "T_2R=460+T_2F #[R]\n", "delta_h=143.35*778. #[ft*lbf/lbm]\n", "delta_v=0.01602-0.01747 #[ft**(3)/lbm]\n", "delta_v1=delta_v*144 #[ft*in/lbm]\n", "\n", "T_1=460+32. #[R]\n", "dP_by_dT=delta_h/(T_1*delta_v1) #[psi/R] at 32F\n", "delta_T=T_2R-T_1\n", "\n", "\n", "delta_P=(dP_by_dT)*delta_T #[psi]\n", "\n", "delta_P=delta_P+0.09 #[psi]\n", "\n", "print \"Freezing preesure of water at given temperature is %f psi\"%(delta_P)\n", "\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Freezing preesure of water at given temperature is 42991.024258 psi\n" ] } ], "prompt_number": 12 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }