summaryrefslogtreecommitdiff
path: root/2870/CH13/EX13.6/Ex13_6.sce
blob: a1dd47006ae11fea8b03e7a33639586020c659db (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
clc;clear;
//Example 13.6
//13.6 (d) answer not matching as float datatype is giving more accurate answer in comparison to textbook that has given approximate due to rounding off to two decimal places

//given data
mfs=0.0348;
mfw=0.9652;
T0=288.15;

//constants used
Mw=18;
Ms=58.44;
Rw=0.4615;
pm=1028;
Ru=8.314;

//calculations
//part - a
Mm=1/((mfs/Ms)+(mfw/Mw));
yw=mfw*Mm/Mw;
ys=1-yw;
disp(yw,'the mole fraction of the water');
disp(ys,'the mole fraction of the saltwater');

//part - b
wmin=-Ru*T0*(ys*log(ys)+yw*log(yw));
wm=wmin/Mm;
disp(wm,'the minimum work input required to separate 1 kg of seawater completely into pure water and pure salts in kJ');

//part - c
wmin=Rw*T0*log(1/yw);
disp(wmin,'the minimum work input required to obtain 1 kg of fresh water from the sea in kJ');

//part - d
Pmin=pm*Rw*T0*log(1/yw);
disp(Pmin,'the minimum gauge pressure that the seawater must be raised if fresh water is to be obtained by reverse osmosis using semipermeable membranes in kPa')