1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
{
"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": {}
}
]
}
|