summaryrefslogtreecommitdiff
path: root/3718/CH14/EX14.4/Ex14_4.sce
diff options
context:
space:
mode:
Diffstat (limited to '3718/CH14/EX14.4/Ex14_4.sce')
-rw-r--r--3718/CH14/EX14.4/Ex14_4.sce23
1 files changed, 23 insertions, 0 deletions
diff --git a/3718/CH14/EX14.4/Ex14_4.sce b/3718/CH14/EX14.4/Ex14_4.sce
new file mode 100644
index 000000000..7337837da
--- /dev/null
+++ b/3718/CH14/EX14.4/Ex14_4.sce
@@ -0,0 +1,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)