{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 1 : Introduction to Equilibrium" ] }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 1.1 Page: 9" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "\n", "m_i = 10. #[g]\n", "m_w = 990. #[g]\n", "M_i = 342.3 #[g]\n", "M_w = 18. #[g]\n", "\n", "\n", "x_i = m_i/(m_i+m_w)\n", "x_i = x_i*100. # [in percentage]\n", "\n", "n_i = m_i/M_i # number of moles of sucrose\n", "n_w = m_w/M_w # number of moles of water\n", "x_j = n_i/(n_i+n_w)\n", "x_j = x_j*100 # [in percentage]\n", "\n", "m = n_i/m_w*1000 #[molal]\n", "x_ppm = x_i*10**(6)/100. #[ppm]\n", "\n", "print \" sucrose concentration in terms of the mass fraction is %f%%\"%(x_i)\n", "print \" sucrose concentration in terms of the mole fraction is %f%%\"%(x_j)\n", "print \" sucrose concentration in terms of the molality is %f molal\"%(m)\n", "print \" sucrose concentration in terms of the ppm is %f ppm\"%(x_ppm)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " sucrose concentration in terms of the mass fraction is 1.000000%\n", " sucrose concentration in terms of the mole fraction is 0.053088%\n", " sucrose concentration in terms of the molality is 0.029509 molal\n", " sucrose concentration in terms of the ppm is 10000.000000 ppm\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 3, "metadata": {}, "source": [ "Example 1.2 Page: 9" ] }, { "cell_type": "code", "collapsed": false, "input": [ "\n", "import math \n", "\n", "T = 20. #[C]\n", "d = 1.038143/1000*10.**(6) #[kg/m**(3)]\n", "m_i = 10. #[g] mass of sucrose\n", "M_i = 342.3 #[g/mol] molecular weight of sucrose\n", "\n", "m = 1.00 #[kg]\n", "V = m/d*1000 #[L]\n", "\n", "m_1 = m_i/V #[g/L]\n", "\n", "\n", "m_2 = (m_i/M_i)/V #[mol/L]\n", "\n", "print \" Mass concentration of the solution is %f g/L\"%(m_1)\n", "print \" Mole concentration of the solution is %f mol/L\"%(m_2)\n", "\n", "print \" Molarity of the solution is %f mol/L\"%(m_2)\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ " Mass concentration of the solution is 10.381430 g/L\n", " Mole concentration of the solution is 0.030328 mol/L\n", " Molarity of the solution is 0.030328 mol/L\n" ] } ], "prompt_number": 4 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }