{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 12 : Vapor liquid Equilibrium" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 12.1 Page No : 423" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "%pylab inline\n", "import math \n", "from numpy import *\n", "from matplotlib.pyplot import *\n", "\n", "# Variables\n", "T = 60.\t\t\t #temperature of the system in degree celsius\n", "P = [237.60,265.20,317.50,333.00,368.70,387.20];\t\t\t #Pressure data in Torr (from Danneil et al.)\n", "x1 = [0.0870,0.1800,0.4040,0.4790,0.7130,0.9070];\t\t\t #mole fraction of benzene in the liquid phase corresponding to the given pressure (no unit) (from Danneil et al.)\n", "y1 = [0.1870,0.3400,0.5780,0.6420,0.7960,0.9220];\t\t\t #mole fraction of benzene in the vapour phase corresponding to the given pressure (no unit) (from Danneil et al.)\n", "antoine_const_benzene = [6.87987,1196.760,219.161];\t\t\t #Antoine's constants for Benzene from Table A.7\n", "antoine_const_heptane = [6.89386,1264.370,216.640];\t\t\t #Antoine's constants for heptane from Table A.7\n", "\n", "# Calculations\n", "P1_s = 10**(antoine_const_benzene[0]-(antoine_const_benzene[1]/(T+antoine_const_benzene[2])));\n", "P2_s = 10**(antoine_const_heptane[0]-(antoine_const_heptane[1]/(T+antoine_const_heptane[2])));\n", "l = len(P);\t\t\t #iteration parameter\n", "i = 0;\t\t\t #iteration parameter\n", "gaamma1 = zeros(l)\n", "gaamma2 = zeros(l)\n", "ln_gaamma1_expt = zeros(l)\n", "ln_gaamma2_expt = zeros(l)\n", "gE_RTx1x2 = zeros(l)\n", "while i" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 12.3 Page No : 430" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from numpy import *\n", "# Variables\n", "T = 25. \t\t\t #temperature of the system in degree celsius\n", "A12 = 2.0522;\t\t\t #three suffix Margules parameters for the system (no unit)\n", "A21 = 1.7201;\t\t\t #three suffix Margules parameters for the system (no unit)\n", "P = [118.05,207.70,246.35,259.40,261.50,262.00,261.90,258.70,252.00];\t\t\t #Pressure data in Torr (from Tasic et al.)\n", "x1 = [0.0115,0.1125,0.3090,0.5760,0.6920,0.7390,0.7575,0.8605,0.9250];\n", "y1 = [0.1810,0.5670,0.6550,0.7050,0.7250,0.7390,0.7460,0.8030,0.8580];\n", "antoine_const_acetone = [7.11714,1210.595,229.664];\t\t\t #Antoine's constants for acetone from Table A.7\n", "antoine_const_chexane = [6.85146,1206.470,223.136];\t\t\t #Antoine's constants for cyclohexane from Table A.7\n", "\n", "# Calculations\n", "P1_s = 10**(antoine_const_acetone[0]-(antoine_const_acetone[1]/(T+antoine_const_acetone[2])));\n", "P2_s = 10**(antoine_const_chexane[0]-(antoine_const_chexane[1]/(T+antoine_const_chexane[2])));\n", "\n", "l = len(P)\n", "ln_gaamma1 = zeros(l)\n", "ln_gaamma2 = zeros(l)\n", "gaamma1 = zeros(l)\n", "gaamma2 = zeros(l)\n", "P = zeros(l)\n", "y1_calc = zeros(l)\n", "j = 0;\t\n", "\n", "while j" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 12.9 Page No : 464" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from numpy import *\n", "from matplotlib.pyplot import *\n", "%pylab inline\n", "# Variables\n", "\n", "P = 760.\t\t\t #pressure of the system in Torr\n", "antoine_const_benzene = [6.87987,1196.760,219.161];\t\t\t #Antoine's constants for Benzene from Table A.7\n", "t = linspace(60,100,9);\t\t\t #temperature range in degree celsius\n", "\n", "P2_s = [149.40,187.58,233.71,289.13,355.21,433.51,525.84,634.00,760.00];\n", "x1 = linspace(0,1,6)\n", "\n", "# Calculations\n", "l = len(t)\n", "i = 0\n", "P1_s = zeros(l)\n", "P_tot = zeros(l)\n", "\n", "while i" ] } ], "prompt_number": 8 } ], "metadata": {} } ] }