summaryrefslogtreecommitdiff
path: root/905/CH1/EX1.2/1_2.sce
blob: 3c5fe66d4075e51b38741a2e91f8589df324b172 (plain)
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
clear;
clc;

// Illustration 1.2
// Page: 7

printf('Illustration 1.2 - Page: 7\n\n');

//*****Data*****
// Component  a-KNO3   b-H20
T = 293; // [K]
s_eqm = 24; // [percent by weight, %]
row = 1162; // [density of saturated solution, kg/cubic m]
//*****//

printf('Illustration 1.2 (a)- Page: 7\n\n');
// Solution (a)

// Basis: 100 kg of fresh wash solution
m_a = (s_eqm/100)*100; // [kg]
m_b = 100 - m_a; // [kg]
M_a = 101.10; // [gram/mole]
M_b = 18.02; // [gram.mole]
// Therefore moles of component 'a' and 'b' are
n_a = m_a/M_a; // [kmole]
n_b = m_b/M_b; // [kmole]

m_total = 100; // [basis, kg]
n_total = n_a+n_b; // [kmole]
// Average molecular weight
M_avg = m_total/n_total; // [kg/kmole]
// Total molar density of fresh solution
C = row/M_avg; // [kmole/cubic m]
printf("Total molar density of fresh solution is %f kmole/cubic m\n\n",C);

printf('Illustration 1.2 (b)- Page: 8\n\n');
// Solution (b)

// mole fractions of components 'a' and 'b'
x_a = n_a/n_total;
x_b = n_b/n_total;
printf("Mole fraction of KNO3 and H2O is %f %f",x_a,x_b);