summaryrefslogtreecommitdiff
path: root/3718/CH14/EX14.4/Ex14_4.sce
blob: 7337837da73fa81315012332e5b962cd6a3f4c95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//Chapter 14: Water Treatment
//Problem: 4
clc;

//Initialisation of Variables
i1 = 180     //in mg/L for CaCl2
i2 = 210     //in mg/L for Ca(NO3)2
i3 = 123     //in mg/L for MgSO4
i4 = 90      //in mg/L for Mg(HCO3)2

//Solution
i1_req = i1 * 100 / 111.
i2_req = i2 * 100 / 164.
i3_req = i3 * 100 / 120.
i4_req = i4 * 100 / 146.

lime_req = 74 / 100. * (2 * i4_req + i3_req) * 100 / 70. * 10000 //where lime_req is the required value
alime_req=lime_req / (10 ** 6) //where alime_req is the approximated value
soda_req = 106 / 100. * (i1_req + i3_req + i2_req) * 100 / 80. * 10000 //where soda_req is the required value
asoda_req=soda_req / (10 ** 6) //where asoda_req is the approximated value

mprintf("Lime Required : %.1e mg ~ %.1f Kg\n",lime_req,alime_req)
mprintf(" Soda Required : %.1e mg ~ %.1f Kg",soda_req,asoda_req)