{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 12 : Compartment Models" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 12.1 page no : 289" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "tg = (8.*(9.-6)*(0.5)+11.*(15.-9)*(0.5))/((15.-6)*0.5) #sec\n", "tl = 40. #sec\n", "vg = 0.5\n", "vl = 0.1;\n", "\n", "# Calculations\n", "Vg = tg*vg;\n", "Vl = tl*vl;\n", "G = Vg*10\n", "L = Vl*10\n", "Stagnant = (100-G-L)\n", "\n", "# Results\n", "print \" fraction of gas is %.f %%\"%(G)\n", "print \" fraction of liquid is %.f %%\"%(L)\n", "print \" fraction of Stangnant liquid is %.f %%\"%(Stagnant)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " fraction of gas is 50 %\n", " fraction of liquid is 40 %\n", " fraction of Stangnant liquid is 10 %\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 12.2 page no : 290" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "# Variables\n", "CAo = 1.;\n", "XA = 0.75 #present\n", "CA = 1-XA;\n", "\n", "# Calculations\n", "kt1 = (CAo-CA)/CA;\n", "kt2 = 3*kt1; #volume is reduced by 1/3\n", "CA_unconverted = 1./(kt2+1);\n", "XA = 1-CA_unconverted #New XA after replacing the stirrer\n", "\n", "# Results\n", "print \" New Conversion expected is %.1f %%\"%(XA*100)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " New Conversion expected is 90.0 %\n" ] } ], "prompt_number": 3 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }