{ "metadata": { "name": "", "signature": "sha256:f3cec47bab65968aba0bcccd8c2f1c496fe12768e6187c410c88539ccdcef3ee" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter15-multicomponet systems" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example1-pg436" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calculate volume of the phase\n", "##initialisation of variables\n", "m2= 50. ##gms\n", "M= 46. ##gms\n", "m1= 50. ##gms\n", "M1= 18. ##gms\n", "v1= 17402. ##cm^3/kmol\n", "v2= 56090. ##cm^3/kmol\n", "##CALCULATIONS\n", "x2= (m2/M)/((m2/M)+(m1/M1))\n", "V= (v1*(m1/M1)+v2*(m2/M))*math.pow(10,-3)\n", "##RESULTS\n", "print'%s %.1f %s'% ('volume of the phase=',V,'cm^3')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "volume of the phase= 109.3 cm^3\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example3-pg450" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import math\n", "#calcualte difference in enthalpy and amount of heat removed\n", "##initialisation of variables\n", "nw= 9 ##kmol\n", "na= 1 ##kmol\n", "##CALCULATIONS\n", "dh= 75*nw*nw/math.pow(na+1.8*nw,2)\n", "Q= -75*na*nw/(nw+1.8*na)\n", "##RESULTS\n", "print'%s %.2f %s'% ('difference in enthalpy=',dh,'kJ/kg')\n", "print'%s %.1f %s'% ('amount of heat removed=',Q,'kJ')\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "difference in enthalpy= 20.53 kJ/kg\n", "amount of heat removed= -62.5 kJ\n" ] } ], "prompt_number": 2 } ], "metadata": {} } ] }