{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 2 : Basic Chemical Calculations" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.1 Page 17" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "5 mol of NH4Cl = 267.5 [g]\n" ] } ], "source": [ "# solution \n", "\n", "# Variables \n", "# NH4Cl\n", "M = 14+4+35.5 # [g] (molar mass of NH4Cl)\n", "n=5 # [mol]\n", "\n", "# Calculation \n", "m = M*n # [g]\n", "\n", "# Result\n", "print \"5 mol of NH4Cl = \",m,\" [g]\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.2 Page 17" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "In the formula CuSO4.5H2O, the moles of CuSO4 is one hence, the equivalent moles of CuSO4 in the crystal is 2.0 .\n" ] } ], "source": [ "# solution \n", "# Variables \n", "\n", "# CuSO4.5H2O\n", "M1 = 159.5 # [g] (molar mass of CuSO4)\n", "M2 = 159.5+5.*(2.+16) # (molar mass of CuSO4.5H2O)\n", "m = 499.\n", "\n", "# Calculation \n", "n = m/M2 #[mol]\n", "\n", "# Result\n", "print \"In the formula CuSO4.5H2O, the moles of CuSO4 is one hence,\\\n", " the equivalent moles of CuSO4 in the crystal is \",n,\".\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.3 Page 17" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " 1.5 kmol of K2CO3 contains 117 kg of K.\n" ] } ], "source": [ "# solution \n", "# Variables \n", "\n", "# K2CO3\n", "m = 117. # [kg] (wt of K)\n", "Mk = 39. # [g] (at wt of K)\n", "\n", "# Calculation \n", "a = m/Mk # [kg atoms] \n", "\n", "# 1 mol of K2CO3 contains 2 atoms of K\n", "n = a/2. # [kmol] (moles of K2CO3)\n", "\n", "# Result\n", "print \" \",n,\" kmol of K2CO3 contains 117 kg of K.\" \n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.4 Page 18" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Atoms present in 416.6 g BaCl2 = 1.2044e+24 \n" ] } ], "source": [ "# solution \n", "\n", "# Variables \n", "# BaCl2\n", "M = 137.3+2*35.5 # [g] (molar mass of BaCl2)\n", "m = 416.6 # [g]\n", "\n", "# Calculation \n", "n = m/M # [mol]\n", "N = n*6.022*10**23 # (no. of atoms)\n", "\n", "# Result\n", "print \"Atoms present in 416.6 g BaCl2 = \",N,\"\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.5 Page 19" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "a eq. mass of PO4 is 31.6666666667 [g] \n", "b eq. mass of Na3PO4 is 54.6666666667 [g] \n" ] } ], "source": [ "# solution \n", "\n", "# Variables \n", "print \"a \",\n", "#PO4 radical\n", "M = 31+4*16. #[g] \n", "V = 3. # (valence of PO4)\n", "\n", "# Calculation and Result\n", "eqm = M/V \n", "print \"eq. mass of PO4 is \",eqm,\" [g] \"\n", "print \"b \",\n", "#Na3PO4\n", "M = 3*23+95. #[g]\n", "V = 3.\n", "eqm = M/V\n", "print \"eq. mass of Na3PO4 is \",eqm,\" [g] \"\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.6 Page 19" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "no. of equivalents in 3 kmol of AlCl3 is 9.0 keq.\n" ] } ], "source": [ "# solution \n", "\n", "# Variables \n", "# AlCl3\n", "v = 3. # valency of Al ion\n", "\n", "# Calculation \n", "eq = 3.*3 # [mol]\n", "\n", "# Result\n", "print \"no. of equivalents in 3 kmol of AlCl3 is \",eq,\" keq.\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.7 Page 20" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "a mass percentage of NaCl is 75.0 mass percentage of KCl is 25.0 \n", "b mol percentage of NaCl is 79.2553191489 mol percentage of KCl is 20.7446808511 \n" ] } ], "source": [ "# solution \n", "\n", "# Variables \n", "# (a)\n", "print \"a \",\n", "# mass %\n", "m1 = 600. #[kg] (NaCl)\n", "m2 = 200. #[kg] (KCl)\n", "\n", "# Calculation \n", "m = m1+m2 # total mass\n", "Wa = (m1/m)*100.\n", "Wb = (m2/m)*100.\n", "\n", "# Result\n", "print \"mass percentage of NaCl is \",Wa,\" mass percentage of KCl is \",Wb,\" \"\n", "\n", "# (b)\n", "print \"b \",\n", "#mol %\n", "M1 = 23+35.5 # molar mass of NaCl\n", "n1 = m1/M1 # no. of moles of NaCl\n", "M2 = 39+35.5 # molar mass of KCl\n", "n2 = m2/M2 # no. of moles of KCl\n", "n = n1+n2\n", "N1 = (n1/n)*100.\n", "N2 = (n2/n)*100.\n", "print \"mol percentage of NaCl is \",N1,\" mol percentage of KCl is \",N2,\" \"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.8 Page 21" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "mass percentage of C is 53.4941324009\n", " mass percentage of H is 1.57123286189\n", " mass percentage of O is 24.9407534679\n", " mass percentage of S is 19.9938812693\n", "molar mass = 12.2023744565 kg/kmol.\n" ] } ], "source": [ "# solution \n", "\n", "# Variables \n", "# CH.35O.35S.14\n", "# mass %\n", "C = 12.0107 #[kg] \n", "H = 1.00794*.35 # [kg]\n", "O = 15.9994*.35 # [kg]\n", "S = 32.065*.14 #[kg]\n", "\n", "# Calculation \n", "m = C+H+O+S\n", "m1 = (C/m)*100.\n", "m2 = (H/m)*100.\n", "m3 = (O/m)*100.\n", "m4 = (S/m)*100.\n", "\n", "# Result\n", "print \"mass percentage of C is \",m1\n", "print \" mass percentage of H is \",m2\n", "print \" mass percentage of O is \",m3\n", "print \" mass percentage of S is \",m4\n", "M = m/(1+.35+.35+.14)\n", "print \"molar mass = \",M,\" kg/kmol.\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.9 Page 22" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The sample contains 96.4285714286 percent urea.\n" ] } ], "source": [ "# solution \n", "\n", "# Variables \n", "# basis 100kg urea\n", "m1 = 45. #[kg] (mass of N present)\n", "Mu = 60. # (molar mass of urea)\n", "m2 = 14*2. #[kg] (mass of N in 1 kmol of urea)\n", "\n", "# Calculation \n", "m = (Mu/m2)*m1\n", "\n", "# Result\n", "print \"The sample contains \",m,\" percent urea.\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.10 Page 22" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Mass percent of SiO2 is 0.006 .\n" ] } ], "source": [ "# solution \n", "\n", "# Variables \n", "# NaOH\n", "Impurity = 60. # [ppm] SiO2\n", "\n", "# Calculation \n", "m = (60/1000000.)*100.\n", "\n", "# Result\n", "print \"Mass percent of SiO2 is \",m,\".\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.11 Page 22" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Total no. of Ca+ ions is 392.749838659 and total no. of F- ions is 2.43335898941 .\n" ] } ], "source": [ "# solution \n", "\n", "# Variables \n", "Ca = 40.078 # at. wt of Ca\n", "F = 18.9984032 # at wt of F\n", "\n", "# Calculation \n", "M1 = 3*Ca +2*(30.97762+(4*15.9994)) # molar mass of Ca3PO4\n", "M2 = Ca +12.0107+3*15.9994 # molar mass of CaCO3\n", "M3 = Ca+2*F # molar mass of CaF2\n", "m1 = 800. #[mg] Ca3PO4\n", "m2 = 200. #[mg] CaCO3\n", "m3 = 5. #[mg] CaF2\n", "n1 = ((3*Ca)/M1)*m1+(Ca/M2)*m2+(Ca/M3)*m3 # [mg] total Ca ions\n", "n2 = (F/M3)*2*5 #[mg] total F ions\n", "\n", "# Result\n", "print \"Total no. of Ca+ ions is \",n1,\" and total no. of F- ions is \",n2,\".\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.12 Page 23" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "a mass percent of salicylic acid is 39.0243902439 and mass percent of methanol is 60.9756097561 . \n", "b Mole percent of methanol is 87.0772337203 and Mole percent of salicylic acid is 12.9227662797 .\n" ] } ], "source": [ "\n", "# solution \n", "\n", "# Variables \n", "# (a)\n", "print \"a \",\n", "# mass %\n", "m1 = 100. #[kg] methanol (basis)\n", "m2 = 64. #[kg] salicylic acid\n", "\n", "# Calculation \n", "m = m1+m2 # [kg] mass of solution\n", "w1 = m2/m*100\n", "w2 = 100-w1\n", "\n", "# Result\n", "print \"mass percent of salicylic acid is \",w1,\" and mass percent of methanol is \",w2,\". \"\n", "\n", "#(b)\n", "print \"b \",\n", "#mole %\n", "M1 = 32. # molar mass of methanol\n", "M2 = 138. #molar mass of salicylic acid\n", "n1 = m1/M1 #[kmol] methanol\n", "n2 = m2/M2 #[kmol] salicylic acid\n", "n = n1+n2\n", "N1 = n1/n*100.\n", "N2 = n2/n*100.\n", "print \"Mole percent of methanol is \",N1,\" and Mole percent of salicylic acid is \",N2,\".\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.13 Page 24" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "mass percent of HCl is 11.195554466\n", "mass percent of NaCl is 7.08506987007\n", "and mass percent of H2O is 81.719375664 . \n", "Mole percent of HCl is 6.1851712101\n", "Mole percent of NaCl is 2.44200543258\n", "and Mole percent of H2O is 91.3728233573\n" ] } ], "source": [ "\n", "# solution \n", "\n", "# Variables \n", "#mass %\n", "m1 = 13.70 # HCl\n", "m2 = 8.67 # NaCl\n", "m3 = 100. # H2O\n", "\n", "# Calculation \n", "m = m1+m2+m3 # mass of solution\n", "w1 = m1/m*100.\n", "w2 = m2/m*100.\n", "w3 = m3/m*100.\n", "\n", "# Result\n", "print \"mass percent of HCl is \",w1\n", "print \"mass percent of NaCl is \",w2\n", "print \"and mass percent of H2O is \",w3,\". \"\n", "M1=36.4609 #HCl\n", "M2=58.4428 #NaCl\n", "M3=18.0153 #H2O\n", "n1=m1/M1 #HCl\n", "n2=m2/M2 #NaCl\n", "n3=m3/M3 #H2O\n", "n=n1+n2+n3\n", "N1=n1/n*100.\n", "N2=n2/n*100.\n", "N3=n3/n*100.\n", "print \"Mole percent of HCl is \",N1\n", "print \"Mole percent of NaCl is \",N2\n", "print \"and Mole percent of H2O is \",N3\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.14 Page 24" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "percentage of Na2O in the solution is 56.575 .\n" ] } ], "source": [ "\n", "# solution \n", "# Variables\n", "\n", "m = 100. #[kg] Lye (basis)\n", "m1 = 73. #[kg] NaOH\n", "M1 = 40. # NaOH\n", "M2 = 62. # Na2O\n", "\n", "# Calculation\n", "p = (M2*m1)/(2*M1)\n", "\n", "# Result\n", "print \"percentage of Na2O in the solution is \",p,\".\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.15 Page 25" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "TOC = 234.782608696 mg/l\n", "ThOD = 730.434782609 mg/l\n" ] } ], "source": [ "\n", "# solution \n", "\n", "# Variables \n", "#(CH2OH)3\n", "M = 92. # molar mass of glycerin\n", "C = 600. #[mg/l] glycerin conc.\n", "\n", "# Calculation \n", "TOC = (3.*12./92.)*600. #[mg/l]\n", "\n", "# by combustion reaction we see 3.5 O2 is required for 1 mol of (CH2OH)3\n", "ThOD = (3.5*32.*600)/92 #[mg/l]\n", "\n", "# Result\n", "print \"TOC = \",TOC,\" mg/l\"\n", "print \"ThOD = \",ThOD,\" mg/l\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.16 Page 25" ] }, { "cell_type": "code", "execution_count": 16, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Actual concentration of CaHCO32 in the sample water is 486.0 mg/l and of MgHCO32 is 292.6 mg/l.\n" ] } ], "source": [ "# solution \n", "\n", "# Variables \n", "M1 = 100. # CaCO3\n", "v1 = 2. # valence of CaCO3\n", "\n", "# Calculation \n", "eqm1 = M1/v1 # equivalent mass of CaCO3\n", "M2 = 162. # Ca(HCO3)2\n", "v2 = 2.\n", "eqm2 = M2/v2\n", "m = 500. # [mg/l] CaCO3\n", "C1 = (eqm2/eqm1)*m*.6 # [mg/l] conc. of Ca(HCO3)2\n", "M3 = 146.3 # Mg(HCO3)2\n", "v3 = 2.\n", "eqm3 = M3/v3\n", "C2 = (eqm3/eqm1)*m*.4 #[mg/l] conc. of Mg(HCO3)2\n", "\n", "# Result\n", "print \"Actual concentration of CaHCO32 in the sample\\\n", " water is \",C1,\" mg/l and of MgHCO32 is \",C2,\" mg/l.\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.17 Page 26" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Sulphur content in LDO is 5780.0 ppm.\n" ] } ], "source": [ "# solution \n", "\n", "# Variables \n", "S = .68 # sulphur content by mass\n", "d = .85 # kg/l\n", "\n", "# Calculation \n", "s = (S*d*10**6)/100. # [mg/l] or [ppm]\n", "\n", "# Result\n", "print \"Sulphur content in LDO is \",s,\" ppm.\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.18 Page 26" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Molarity = 0.385299145299 M\n", "Normality = 0.385299145299 N\n", "Molality = 0.42735042735 mol/kg.\n" ] } ], "source": [ "\n", "# solution \n", "\n", "# Variables \n", "m1 = 100. #[kg] solution (basis)\n", "m2 = 20. #[kg] NaCl\n", "d = 1.127 #[kg/l]\n", "\n", "# Calculation \n", "V = m1/d # volume of 100 kg sol.\n", "n = (m2/58.5)*100. # [mol] NaCl\n", "M = n/V #[M]\n", "v = 1. # valence of NaCl so,\n", "N = M\n", "m = n/(m1-m2) #[mol/kg]\n", "\n", "# Result\n", "print \"Molarity = \",M,\"M\"\n", "print \"Normality = \",N,\"N\"\n", "print \"Molality = \",m,\" mol/kg.\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.19 Page 27" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Molarity of solution = 0.352348993289 M.\n" ] } ], "source": [ "# solution \n", "\n", "# Variables \n", "m1 = 100. #[kg] TEA solution (basis)\n", "m2 = 50. #[kg] TEA\n", "M1 = 149. # molar mass of TEA\n", "d = 1.05 #[kg/l]\n", "\n", "# Calculation \n", "V = m1/d # volume of 100 kg sol.\n", "n = (m2/M1)*100. # [mol] NaCl\n", "M = n/V #[M]\n", "\n", "# Result\n", "print \"Molarity of solution = \",M,\" M.\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.20 Page 27" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Mass percent of CO2 = 2.97180327869 and Mol percent = 1.44480291766 .\n" ] } ], "source": [ "# solution \n", "\n", "# Variables \n", "m1 = 100. #[kg] MEA solution (basis)\n", "m2 = 20. #[kg] MEA\n", "M1 = 61. # molar mass of MEA\n", "n1 = m2/M1 # [kmol]\n", "C = .206 \n", "\n", "# Calculation \n", "n2 = C*n1 #[kmol] dissolved CO2\n", "m3 = n2*44 # [kg] mass of CO2\n", "n3 = (m1-m2-m3)/18 #[kmol] water\n", "n = (n2/(n1+n2+n3))*100.\n", "m = (m3/100)*100.\n", "\n", "# Result\n", "print \"Mass percent of CO2 = \",m,\" and Mol percent = \",n,\".\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.21 Page 27" ] }, { "cell_type": "code", "execution_count": 21, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "pH of the sol is 3.50886438348 .\n" ] } ], "source": [ "import math\n", "# solution \n", "# Variables \n", "#HOCl\n", "Ma = .1 #molarity\n", "\n", "# Calculation \n", "Ka = 9.6*10**-7\n", "C = (Ma*Ka)**.5 # conc. of H+ ions\n", "pH = -math.log10(C)\n", "\n", "# Result\n", "print \"pH of the sol is \",pH,\".\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.22 Page 39" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "average molar mass of air is 28.96968 g.\n" ] } ], "source": [ "\n", "\n", "# solution \n", "# Variables \n", "n = 100. # [mol] air (basis)\n", "n1 = 21. #[mol] O2\n", "n2 = 78. #[mol] N2\n", "n3 = 1. #[mol] Ar\n", "M1 = 31.9988 # O2\n", "M2 = 28.0134 # N2\n", "M3 = 39.948 # Ar\n", "\n", "# Calculation \n", "m1 = n1*M1\n", "m2 = n2*M2\n", "m3 = n3*M3\n", "Ma = (m1+m2+m3)/n\n", "\n", "# Result\n", "print \"average molar mass of air is \",Ma,\" g.\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.23 Page 39" ] }, { "cell_type": "code", "execution_count": 23, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "a Average molar mass of gas is 26.54 g.\n", "b GAS Mass Percent \n", " Methane 27.128862095\n", " Ethane 11.3036925396\n", " Ethylene 26.3752825923\n", " Propane 11.6051243406\n", " Propylene 12.6601356443\n", " n-Butane 10.9269027882\n", "c Specific gravity is 0.916120124266 .\n" ] } ], "source": [ "# solution \n", "# Variables \n", "# (a)\n", "print \"a \",\n", "n = 100. # [kmol] cracked gas (basis)\n", "n1 = 45. # methane\n", "n2 = 10. # ethane\n", "n3 = 25. # ethylene\n", "n4 = 7. # propane\n", "n5 = 8. # propylene\n", "n6 = 5. # n-butane\n", "M1 = 16. \n", "M2 = 30.\n", "M3 = 28.\n", "M4 = 44.\n", "M5 = 42.\n", "M6 = 58.\n", "\n", "# Calculation \n", "m1 = n1*M1\n", "m2 = n2*M2\n", "m3 = n3*M3\n", "m4 = n4*M4\n", "m5 = n5*M5\n", "m6 = n6*M6\n", "m = m1+m2+m3+m4+m5+m6\n", "M = m/n\n", "\n", "# Result\n", "print \"Average molar mass of gas is \",M,\" g.\"\n", "#(b)\n", "print \"b \",\n", "\n", "# composition\n", "p1 = (m1/m)*100.\n", "p2 = m2*100./m\n", "p3 = m3*100./m\n", "p4 = m4*100./m\n", "p5 = m5*100./m\n", "p6 = m6*100./m\n", "print \" GAS Mass Percent \"\n", "print \" Methane \",p1\n", "print \" Ethane \",p2\n", "print \" Ethylene \",p3\n", "print \" Propane \",p4\n", "print \" Propylene \",p5\n", "print \" n-Butane \",p6\n", "# (c)\n", "print \"c \",\n", "# specific gravity\n", "g = M/28.97\n", "print \"Specific gravity is \",g,\".\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.24 Page 40" ] }, { "cell_type": "code", "execution_count": 24, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Specific volume = 0.0287598911758 m**3/kg.\n" ] } ], "source": [ "# solution \n", "# Variables \n", "p = 100. #[bar]\n", "T = 623.15 #[K]\n", "R = .083145\n", "\n", "# Calculation \n", "V = R*T/p # [l/mol] molar volume\n", "v = V/18.0153 \n", "\n", "# Result \n", "print \"Specific volume = \",v,\" m**3/kg.\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.25 Page 40" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Molar volume = 16.0708891875 l/mol. \n", "by Vanderwall eq molar volume = 15.74 l/mol\n" ] } ], "source": [ "\n", "# solution \n", "# Variables \n", "p = 4. #[bar]\n", "T = 773.15 #[K]\n", "R = .083145\n", "V = R*T/p # [l/mol] molar volume\n", "print \"Molar volume = \",V,\" l/mol. \"\n", "\n", "# Calculation \n", " # using appendix III\n", " # calculating Tc and Pc of different gases according to their mass fractions\n", "Tc1 = .352*32.20 # H2\n", "Tc2 = .148*190.56 # methane\n", "Tc3 = .128*282.34 #ethylene\n", "Tc4 = .339*132.91 # CO\n", "Tc5 = .015*304.10 # CO2\n", "Tc6 = .018*126.09 # N2\n", "Tc = Tc1+Tc2+Tc3+Tc4+Tc5+Tc6 # Tc of gas\n", "\n", " # similarly finding Pc\n", "Pc1=.352*12.97 \n", "Pc2=.148*45.99\n", "Pc3=.128*50.41\n", "Pc4=.339*34.99\n", "Pc5=.015*73.75\n", "Pc6=.018*33.94\n", "Pc=Pc1+Pc2+Pc3+Pc4+Pc5+Pc6 # Pc of gas\n", "a = (27*R**2*Tc**2)/(64*Pc) # [bar/mol**2]\n", "b = (R*Tc)/(8*Pc) # l/mol\n", "\n", "# substituting these values in vanderwall eq and solving by Newton Rhapson method we get\n", "V = 15.74 # [l/mol]\n", "\n", "# Result\n", "print \"by Vanderwall eq molar volume = \",V,\" l/mol\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.26 Page 43" ] }, { "cell_type": "code", "execution_count": 26, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "component mol percent mass percent\n", " n-Butane 43.1 570378.642948\n", " 1-Butene 56.9 727039.966353\n", " Furfural -26.0350 570378.642948\n" ] } ], "source": [ "\n", "# solution \n", "# Variables \n", "m = 6.5065 #[g] mixture (basis)\n", "Pv = 2.175 #[kPa] V.P. of water over KOH\n", "Pa = 102.5-2.175 #[kPa] Partial P of n-butane and 1butene\n", "V = 415.1*10**-3 #[l]\n", "R = 8.314472\n", "T = 296.4 #[K]\n", "\n", "# Calculation \n", "n = (Pa*V)/R*T # moles of butene and butane\n", "n1 = n*.431 # n-butane\n", "m1 = n1*58 # [g]\n", "n2 = n-n1 # 1 butene\n", "m2 = n2*56 #[g]\n", "m3 = m-m1 # [g] furfural\n", "n3 = m3/96.\n", "\n", "# Result\n", "print \"component mol percent mass percent\"\n", "print \" n-Butane \",n1/n*100,\" \",m1/m*100\n", "print \" 1-Butene \",n2/n*100,\" \",m2/m*100\n", "print \" Furfural %.4f\"%(n3/n*100),\" \",m1/m*100\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.27 Page 44" ] }, { "cell_type": "code", "execution_count": 27, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "mol fraction of Furfural is 0.00379701058122 mol fraction of 1-Butene is 0.996202989419 .\n" ] } ], "source": [ "# solution \n", "\n", "# Variables \n", "P = 5.7+1.01 #[bar] absolute total P\n", "\n", "# Calculation \n", "# using Roult's law\n", "vp = 3.293*.7737 #[kPa] vap P of furfural\n", "# using Dalton's law of partial P\n", "n1 = vp/(P*100) # mol fraction of furfural\n", "n2 = 1-n1 # mol fraction of 1 -butene\n", "\n", "# Result\n", "print \"mol fraction of Furfural is \",n1,\"mol fraction of 1-Butene is \",n2,\".\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.28 Page 44" ] }, { "cell_type": "code", "execution_count": 28, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "absolute humidity = 0.0161586369044 .\n" ] } ], "source": [ "# solution \n", "\n", "# Variables \n", "P = 100. #[kPa] total P\n", "Pw = 2.5326 #[kPa] V.P> of water at dew point\n", "\n", "# Calculation \n", "#absolute humity = mass of water vapour/ mass of dry air\n", "H = (Pw/(P-Pw))*(18.0153/28.9697) # absolute humidity\n", "\n", "# Result\n", "print \"absolute humidity = \",H,\".\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Example 2.29 Page 45" ] }, { "cell_type": "code", "execution_count": 29, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Outlet temperature is 335.758 K\n" ] } ], "source": [ "# solution \n", "\n", "# Variables \n", "#Ti-Tf = mu*(Pi-Pf)\n", "Pi = 20.7 #[bar]\n", "Pf = 8.7 # [bar]\n", "mu = 1.616 #[K/bar]\n", "Ti = 355.15 #[K]\n", "\n", "# Calculation \n", "Tf = Ti-mu*(Pi-Pf)\n", "\n", "# Result\n", "print \"Outlet temperature is \",Tf,\" K\"\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 0 }