{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Chapter 1: Water" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.10: hardness_calculation_by_EDTA_method.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.16 example 2//\n", "clc\n", "conc_SH=0.28/1000//in terms of g/lit//\n", "strength_SH=conc_SH*1000//in terms of mgs/lit//\n", "volume_SH=100//in terms of ml//\n", "volume_H=100//in terms of ml//\n", "EDTA_SH=28//volume for Std hardwater(ml)//\n", "EDTA_H=33//volume for sample hardwater(ml)//\n", "AB_EDTA=10//volume required after boiling(ml)//\n", "CaCO3_equivalent_SH=strength_SH*volume_SH//in terms of CaCO3 equivalent//\n", "one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH//in terms of CaCO3 equivalent//\n", "To_sample=one_ml_EDTA*EDTA_H/volume_H//total hardness for given volume//\n", "To=To_sample*1000//total hardness per litre(ppm)//\n", "P_sample=AB_EDTA*one_ml_EDTA/volume_H//permanent hardness for given volume//\n", "P=P_sample*1000//permanent hardness per litre(ppm)//\n", "T=To-P\n", "printf('\nTotal Hardness is %.f ppm',To);\n", "printf('\nPermanent Hardness is %.f ppm',P);\n", "printf('\nTemporary Hardness is %.f ppm',T);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.11: hardness_calculation_by_EDTA_method.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.17 example 3//\n", "clc\n", "conc_SH=1/1000//in terms of g/lit//\n", "strength_SH=conc_SH*1000//in terms of mgs/lit//\n", "volume_SH=50//in terms of ml//\n", "volume_H=50//in terms of ml//\n", "EDTA_SH=20//volume for Std hardwater(ml)//\n", "EDTA_H=25//volume for sample hardwater(ml)//\n", "AB_EDTA=18//volume required after boiling(ml)//\n", "CaCO3_equivalent_SH=strength_SH*volume_SH//in terms of CaCO3 equivalent//\n", "one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH//in terms of CaCO3 equivalent//\n", "To_sample=one_ml_EDTA*EDTA_H/volume_H//total hardness for given volume//\n", "To=To_sample*1000//total hardness per litre(ppm)//\n", "P_sample=AB_EDTA*one_ml_EDTA/volume_H//permanent hardness for given volume//\n", "P=P_sample*1000//permanent hardness per litre(ppm)//\n", "T=To-P\n", "printf('\nTotal Hardness is %.f ppm',To);\n", "printf('\nPermanent Hardness is %.f ppm',P);\n", "printf('\nTemporary Hardness is %.f ppm',T);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.12: hardness_calculation_by_EDTA_method.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.18 example 4//\n", "clc\n", "conc_SH=15/1000//in terms of g/lit//\n", "strength_SH=conc_SH*1000//in terms of mgs/lit//\n", "volume_SH=20//in terms of ml//\n", "volume_H=100//in terms of ml//\n", "EDTA_SH=25//volume for Std hardwater(ml)//\n", "EDTA_H=18//volume for sample hardwater(ml)//\n", "AB_EDTA=12//volume required after boiling(ml)//\n", "CaCO3_equivalent_SH=strength_SH*volume_SH//in terms of CaCO3 equivalent//\n", "one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH//in terms of CaCO3 equivalent//\n", "To_sample=one_ml_EDTA*EDTA_H/volume_H//total hardness for given volume//\n", "To=To_sample*1000//total hardness per litre(ppm)//\n", "P_sample=AB_EDTA*one_ml_EDTA/volume_H//permanent hardness for given volume//\n", "P=P_sample*1000//permanent hardness per litre(ppm)//\n", "T=To-P\n", "printf('\nTotal Hardness is %.f ppm',To);\n", "printf('\nPermanent Hardness is %.f ppm',P);//Final answer in book is incorrect//\n", "printf('\nTemporary Hardness is %.f ppm',T);//Final answer in book is incorrect//" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.13: hardness_calculation_by_EDTA_method.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.19 example 5//\n", "clc\n", "conc_SH=0.5/500//in terms of g/lit//\n", "strength_SH=conc_SH*1000//in terms of mgs/lit//\n", "volume_SH=50//in terms of ml//\n", "volume_H=50//in terms of ml//\n", "EDTA_SH=48//volume for Std hardwater(ml)//\n", "EDTA_H=15//volume for sample hardwater(ml)//\n", "AB_EDTA=10//volume required after boiling(ml)//\n", "CaCO3_equivalent_SH=strength_SH*volume_SH//in terms of CaCO3 equivalent//\n", "one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH//in terms of CaCO3 equivalent//\n", "To_sample=one_ml_EDTA*EDTA_H/volume_H//total hardness for given volume//\n", "To=To_sample*1000//total hardness per litre(ppm)//\n", "P_sample=AB_EDTA*one_ml_EDTA/volume_H//permanent hardness for given volume//\n", "P=P_sample*1000//permanent hardness per litre(ppm)//\n", "T=To-P\n", "printf('\nTotal Hardness is %.1f ppm',To);\n", "printf('\nPermanent Hardness is %.2f ppm',P);\n", "printf('\nTemporary Hardness is %.2f ppm',T);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.14: hardness_calculation_by_EDTA_method.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.20 example 6//\n", "clc\n", "conc_SH=1/1000//in terms of g/lit//\n", "strength_SH=conc_SH*1000//in terms of mgs/lit//\n", "volume_SH=50//in terms of ml//\n", "volume_H=50//in terms of ml//\n", "EDTA_SH=45//volume for Std hardwater(ml)//\n", "EDTA_H=25//volume for sample hardwater(ml)//\n", "AB_EDTA=15//volume required after boiling(ml)//\n", "CaCO3_equivalent_SH=strength_SH*volume_SH//in terms of CaCO3 equivalent//\n", "one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH//in terms of CaCO3 equivalent//\n", "To_sample=one_ml_EDTA*EDTA_H/volume_H//total hardness for given volume//\n", "To=To_sample*1000//total hardness per litre(ppm)//\n", "P_sample=AB_EDTA*one_ml_EDTA/volume_H//permanent hardness for given volume//\n", "P=P_sample*1000//permanent hardness per litre(ppm)//\n", "T=To-P\n", "printf('\nTotal Hardness is %.2f ppm',To);\n", "printf('\nPermanent Hardness is %.2f ppm',P);\n", "printf('\nTemporary Hardness is %.2f ppm',T);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.15: hardness_calculation_by_EDTA_method.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.21 example 7//\n", "clc\n", "conc_SH=1/20//in terms of g/lit//\n", "strength_SH=conc_SH*1000//in terms of mgs/lit//\n", "volume_SH=50//in terms of ml//\n", "volume_H=50//in terms of ml//\n", "EDTA_SH=1000//volume for Std hardwater(ml)//\n", "EDTA_H=7.2//volume for sample hardwater(ml)//\n", "AB_EDTA=4//volume required after boiling(ml)//\n", "CaCO3_equivalent_SH=strength_SH*volume_SH//in terms of CaCO3 equivalent//\n", "one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH//in terms of CaCO3 equivalent//\n", "To_sample=one_ml_EDTA*EDTA_H/volume_H//total hardness for given volume//\n", "To=To_sample*1000//total hardness per litre(ppm)//\n", "P_sample=AB_EDTA*one_ml_EDTA/volume_H//permanent hardness for given volume//\n", "P=P_sample*1000//permanent hardness per litre(ppm)//\n", "T=To-P\n", "printf('\nTotal Hardness is %.f ppm',To);\n", "printf('\nPermanent Hardness is %.f ppm',P);\n", "printf('\nTemporary Hardness is %.f ppm',T);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.16: hardness_calculation_by_EDTA_method.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.22 example 8//\n", "clc\n", "conc_SH=1.2/1000//in terms of g/lit//\n", "strength_SH=conc_SH*1000//in terms of mgs/lit//\n", "volume_SH=20//in terms of ml//\n", "volume_H=50//in terms of ml//\n", "EDTA_SH=35//volume for Std hardwater(ml)//\n", "EDTA_H=30//volume for sample hardwater(ml)//\n", "AB_EDTA=25//volume required after boiling(ml)//\n", "CaCO3_equivalent_SH=strength_SH*volume_SH//in terms of CaCO3 equivalent//\n", "one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH//in terms of CaCO3 equivalent//\n", "To_sample=one_ml_EDTA*EDTA_H/volume_H//total hardness for given volume//\n", "To=To_sample*1000//total hardness per litre(ppm)//\n", "P_sample=AB_EDTA*one_ml_EDTA/volume_H//permanent hardness for given volume//\n", "P=P_sample*1000//permanent hardness per litre(ppm)//\n", "T=To-P\n", "printf('\nTotal Hardness is %.f ppm',To);\n", "printf('\nPermanent Hardness is %.1f ppm',P);\n", "printf('\nTemporary Hardness is %.1f ppm',T);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.17: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.31 example 1//\n", "clc \n", "Purity_Lime=.90\n", "Purity_soda=1\n", "W1=136;//amount of CaSO4 in ppm//\n", "W2=49;//amount of H2SO4 in ppm//\n", "W3=95;//amount of MgCl2 in ppm//\n", "W4=60;//amount of MgSO4 in ppm//\n", "M1=100/136;//multiplication factor of CaSO4//\n", "M2=100/98;//multiplication factor of H2SO4//\n", "M3=100/95;//multiplication factor of MgCl2//\n", "M4=100/120;//multiplication factor of MgSO4//\n", "P1=W1*M1;//in terms of CaCO3//S\n", "P2=W2*M2;//in terms of CaCO3//L+S\n", "P3=W3*M3;//in terms of CaCO3//L+S\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "printf ('We do not take SiO2 since it does not react with lime/soda');\n", "V=1000000;//volume of water in litres//\n", "L=0.74*(P2+P3+P4)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.f g',L);\n", "S=1.06*(P1+P2+P3+P4)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.18: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.31 example 2//\n", "clc \n", "Purity_Lime=.90\n", "Purity_soda=.95\n", "W1=156;//amount of Mg(HCO3)2 in ppm//\n", "W2=4.9;//amount of H2SO4 in ppm//\n", "W3=23.75;//amount of MgCl2 in ppm//\n", "W4=5.6;//amount of NaCl in ppm//\n", "W5=111;//amount of CaCl2 in ppm//\n", "W6=16.2;//amount of SiO2 in ppm//\n", "M1=100/146;//multiplication factor of Mg(HCO3)2//\n", "M2=100/98;//multiplication factor of H2SO4//\n", "M3=100/95;//multiplication factor of MgCl2//\n", "M5=100/111;//multiplication factor of CaCl2//\n", "P1=W1*M1;//in terms of CaCO3//2*L\n", "P2=W2*M2;//in terms of CaCO3//L+S\n", "P3=W3*M3;//in terms of CaCO3//L+S\n", "P5=W5*M5;//in terms of CaCO3//S\n", "printf ('We do not take NaCl and SiO2 since they do not react with lime/soda');\n", "V=50000;//volume of water in litres//\n", "L=0.74*(2*P1+P2+P3)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.2f g',L);\n", "S=1.06*(P2+P3+P5)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.2f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.19: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.32 example 3//\n", "clc \n", "Purity_Lime=.74\n", "Purity_soda=.90\n", "W1=73;//amount of Mg(HCO3)2 in ppm//\n", "W2=222;//amount of CaCl2 in ppm//\n", "W3=120;//amount of MgSO4 in ppm//\n", "W4=164;//amount of Ca(NO3)2 in ppm//\n", "M1=100/146;//multiplication factor of Mg(HCO3)2//\n", "M2=100/111;//multiplication factor of CaCl2//\n", "M3=100/120;//multiplication factor of MgSO4//\n", "M4=100/164;//multiplication factor of Ca(NO3)2//\n", "P1=W1*M1;//in terms of CaCO3//2*L\n", "P2=W2*M2;//in terms of CaCO3//S\n", "P3=W3*M3;//in terms of CaCO3//L+S\n", "P4=W4*M4;//in terms of CaCO3//S\n", "V=5000;//volume of water in litres//\n", "L=0.74*(2*P1+P3)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.f g',L);\n", "S=1.06*(P2+P3+P4)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.2f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.1: hardness_calculation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.7 example 1//\n", "clc\n", "W1=16.8;//Mg(HCO3)2 in water in mg/L//\n", "W2=19;//MgCl2 in water in mg/L//\n", "W3=24;//MgSO4 in water in mg/L//\n", "W4=29.6;//Mg(NO3)2 in water in mg/L//\n", "W5=04;//CaCO3 in water in mg/L//\n", "W6=10;//MgCO3 in water in mg/L//\n", "M1=100/146;//multiplication factor of Mg(HCO3)2//\n", "M2=100/95;//multiplication factor of MgCl2//\n", "M3=100/120;//multiplication factor of MgSO4//\n", "M4=100/148;//multiplication factor of Mg(NO3)2//\n", "M5=100/100;//multiplication factor of CaCO3//\n", "M6=100/84;//multiplication factor of MgCO3//\n", "P1=W1*M1;//Mg(HCO3)2 in terms of CaCO3 equivalent/litre//\n", "P2=W2*M2;//MgCl2 in terms of CaCO3 equivalent/litre//\n", "P3=W3*M3;//MgSO4 in terms of CaCO3 equivalent/litre//\n", "P4=W4*M4;//Mg(NO3)2 in terms of CaCO3 equivalent/litre//\n", "P5=W5*M5;//CaCO3 in terms of CaCO3 equivalent/litre//\n", "P6=W6*M6;//MgCO3 in terms of CaCO3 equivalent/litre//\n", "T=P1+P5+P6;\n", "printf('\nTemporary hardness is %.1f mg CaCO3 equivalent/litre',T);\n", "P=P2+P3+P4;\n", "printf('\nPermanant hardness is %.0f mg CaCO3 equivalent/litre',P);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.20: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.33 example 4//\n", "clc \n", "Purity_Lime=1\n", "Purity_soda=1\n", "W1=144;//amount of MgCO3 in ppm//\n", "W2=95;//amount of MgCl2 in ppm//\n", "W3=25;//amount of CaCO3 in ppm//\n", "W4=111;//amount of CaCl2 in ppm//\n", "M1=100/84;//multiplication factor of MgCO3//\n", "M2=100/95;//multiplication factor of MgCl2//\n", "M3=100/100;//multiplication factor of CaCO3//\n", "M4=100/111;//multiplication factor of CaCl2//\n", "P1=W1*M1;//in terms of CaCO3//2*L\n", "P2=W2*M2;//in terms of CaCO3//L+S\n", "P3=W3*M3;//in terms of CaCO3//L\n", "P4=W4*M4;//in terms of CaCO3//S\n", "printf ('We do not take Fe2O3 and Na2SO4 since they do not react with lime/soda');\n", "V=50000;//volume of water in litres//\n", "L=0.74*(2*P1+P2+P3)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.2f g',L);\n", "S=1.06*(P2+P4)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.21: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.34 example 5//\n", "clc \n", "Purity_Lime=1\n", "W1=13.6;//amount of CaSO4 in ppm//\n", "W2=8.4;//amount of MgCO3 in ppm//\n", "W3=05;//amount of CaCO3 in ppm//\n", "M1=100/136;//multiplication factor of CaSO4//\n", "M2=100/84;//multiplication factor of MgCO3//\n", "M3=100/100;//multiplication factor of CaCO3//\n", "P1=W1*M1;//in terms of CaCO3//S\n", "P2=W2*M2;//in terms of CaCO3//2*L\n", "P3=W3*M3;//in terms of CaCO3//L\n", "printf ('We do not take KNO3 since it does not react with lime/soda');\n", "V=5000;//volume of water in litres//\n", "L=0.74*(2*P2+P3)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.1f g',L);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.22: calculation_of_required_lime.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.35 example 6//\n", "clc \n", "Purity_soda=1\n", "W1=5;//amount of CaCO3 in ppm//\n", "W2=22.2;//amount of CaCl2 in ppm//\n", "W3=2;//amount of MgSO4 in ppm//\n", "M1=100/100;//multiplication factor of CaCO3//\n", "M2=100/111;//multiplication factor of CaCl2//\n", "M3=100/120;//multiplication factor of MgSO4//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//S\n", "P3=W3*M3;//in terms of CaCO3//L+S\n", "printf ('We do not take Na2SO4 and SiO2 since they do not react with lime/soda');\n", "V=10000;//volume of water in litres//\n", "S=1.06*(P2+P3)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.1f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.23: calculation_of_required_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.36 example 7//\n", "clc \n", "Purity_Lime=1\n", "Purity_soda=1\n", "W1=10;//amount of CaCO3 in ppm//\n", "W2=36.5;//amount of Mg(HCO3)2 in ppm//\n", "W3=19;//amount of MgCl2 in ppm//\n", "M1=100/100;//multiplication factor of CaCO3//\n", "M2=100/146;//multiplication factor of Mg(HCO3)2//\n", "M3=100/95;//multiplication factor of MgCl2//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//2*L\n", "P3=W3*M3;//in terms of CaCO3//L+S\n", "printf ('We do not take SiO2 since it does not react with lime/soda');\n", "V=1000000;//volume of water in litres//\n", "L=0.74*(P1+2*P2+P3)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.f g',L);\n", "S=1.06*(P3)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.24: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.37 example 8//\n", "clc \n", "Purity_Lime=.8\n", "Purity_soda=.9\n", "W1=7.1;//amount of Mg(HCO3)2 in ppm//\n", "W2=8.1;//amount of Ca(HCO3)2 in ppm//\n", "W3=4.195;//amount of MgCO3 in ppm//\n", "W4=10;//amount of CaCO3 in ppm//\n", "M1=100/146;//multiplication factor of Mg(HCO3)2//\n", "M2=100/162;//multiplication factor of Ca(HCO3)2//\n", "M3=100/84;//multiplication factor of MgCO3//\n", "M4=100/100;//multiplication factor of CaCO3//\n", "P1=W1*M1;//in terms of CaCO3//2*L\n", "P2=W2*M2;//in terms of CaCO3//L\n", "P3=W3*M3;//in terms of CaCO3//2*L\n", "P4=W4*M4;//in terms of CaCO3//L\n", "V=100000;//volume of water in litres//\n", "L=0.74*(2*P1+P2+2*P3+P4)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.f g',L);\n", "S=1.06*(0)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.25: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.38 example 9//\n", "clc \n", "Purity_Lime=.9\n", "Purity_soda=.9\n", "W1=19;//amount of MgCl2 in ppm//\n", "W2=27.2;//amount of CaSO4 in ppm//\n", "W3=4.9;//amount of H2SO4 in ppm//\n", "W4=6;//amount of AL3+ in ppm//\n", "M1=100/95;//multiplication factor of MgCl2//\n", "M2=100/136;//multiplication factor of CaSO4//\n", "M3=100/49;//multiplication factor of H2SO4//\n", "M4=100/18.0018;//multiplication factor of AL3+//\n", "P1=W1*M1;//in terms of CaCO3//L+S\n", "P2=W2*M2;//in terms of CaCO3//S\n", "P3=W3*M3;//in terms of CaCO3//L+S\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "V=500000;//volume of water in litres//\n", "L=0.74*(P1+P3+P4)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.2f g',L);\n", "S=1.06*(P1+P2+P3+P4)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.26: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.38 example 10//\n", "clc \n", "Purity_Lime=.9\n", "Purity_soda=.95\n", "W1=81;//amount of Ca(HCO3)2 in ppm//\n", "W2=42;//amount of MgCO3 in ppm//\n", "W3=4.1;//amount of NaAlO2 in ppm//\n", "W4=3.65;//amount of HCl in ppm//\n", "W5=82;//amount of Ca(NO3)2 in ppm//\n", "M1=100/162;//multiplication factor of Ca(HCO3)2//\n", "M2=100/84;//multiplication factor of MgCO3//\n", "M3=100/82;//multiplication factor of NaAlO2//\n", "M4=100/36.5;//multiplication factor of HCl//\n", "M5=100/164;//multiplication factor of Ca(NO3)2//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//2*L\n", "P3=W3*M3;//in terms of CaCO3//-L\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "P5=W5*M5;//in terms of CaCO3//S\n", "printf ('We do not take NaCl since it does not react with lime/soda');\n", "V=20000;//volume of water in litres//\n", "L=0.74*(P1+2*P2+P4-P3)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.2f g',L);\n", "S=1.06*(P4+P5)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.3f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.27: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.39 example 11//\n", "clc \n", "Purity_Lime=.85\n", "Purity_soda=.9\n", "W1=16.2;//amount of Ca(HCO3)2 in ppm//\n", "W2=6.8;//amount of CaSO4 in ppm//\n", "W3=11.1;//amount of CaCl2 in ppm//\n", "W4=6;//amount of MgSO4 in ppm//\n", "W5=8.4;//amount of Mg(HCO3)2 in ppm//\n", "M1=100/162;//multiplication factor of Ca(HCO3)2//\n", "M2=100/136;//multiplication factor of CaSO4//\n", "M3=100/111;//multiplication factor of CaCl2//\n", "M4=100/120;//multiplication factor of MgSO4//\n", "M5=100/146;//multiplication factor of Mg(HCO3)2//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//S\n", "P3=W3*M3;//in terms of CaCO3//S\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "P5=W5*M5;//in terms of CaCO3//2*L\n", "printf ('We do not take NaCl since it does not react with lime/soda');\n", "V=10000;//volume of water in litres//\n", "L=0.74*(P1+P4+2*P5)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.1f g',L);\n", "S=1.06*(P2+P3+P4)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.2f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.28: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.40 example 12//\n", "clc \n", "Purity_Lime=.7\n", "Purity_soda=.85\n", "W1=30.2;//amount of Ca(HCO3)2 in ppm//\n", "W2=20.8;//amount of Mg(HCO3)2 in ppm//\n", "W3=28.31;//amount of CaCl2 in ppm//\n", "W4=8.7;//amount of MgCl2 in ppm//\n", "W5=35;//amount of CaSO4 in ppm//\n", "W6=6.7;//amount of MgSO4 in ppm//\n", "M1=100/162;//multiplication factor of Ca(HCO3)2//\n", "M2=100/146;//multiplication factor of Mg(HCO3)2//\n", "M3=100/111;//multiplication factor of CaCl2//\n", "M4=100/95;//multiplication factor of MgCl2//\n", "M5=100/136;//multiplication factor of CaSO4//\n", "M6=100/120;//multiplication factor of MgSO4//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//2*L\n", "P3=W3*M3;//in terms of CaCO3//S\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "P5=W5*M5;//in terms of CaCO3//S\n", "P6=W6*M6;//in terms of CaCO3//L+S\n", "printf ('We do not take Na2SO4 since it does not react with lime/soda');\n", "V=100000;//volume of water in litres//\n", "L=0.74*(P1+2*P2+P4+P6)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.1f g',L);\n", "S=1.06*(P3+P4+P5+P6)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.29: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.41 example 13//\n", "clc \n", "Purity_Lime=.8\n", "Purity_soda=.85\n", "W1=162;//amount of Ca(HCO3)2 in ppm//\n", "W2=7.3;//amount of Mg(HCO3)2 in ppm//\n", "W3=9.5;//amount of MgCl2 in ppm//\n", "W4=36.5;//amount of HCl in ppm//\n", "W5=44;//amount of CO2 in ppm//\n", "W6=111;//amount of CaCl2 in ppm//\n", "W7=60;//amount of MgSO4 in ppm//\n", "M1=100/162;//multiplication factor of Ca(HCO3)2//\n", "M2=100/146;//multiplication factor of Mg(HCO3)2//\n", "M3=100/95;//multiplication factor of MgCl2//\n", "M4=100/73;//multiplication factor of HCl//\n", "M5=100/44;//multiplication factor of CO2//\n", "M6=100/111;//multiplication factor of CaCl2//\n", "M7=100/120;//multiplication factor of MgSO4//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//2*L\n", "P3=W3*M3;//in terms of CaCO3//L+S\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "P5=W5*M5;//in terms of CaCO3//L\n", "P6=W6*M6;//in terms of CaCO3//S\n", "P7=W7*M7;//in terms of CaCO3//L+S\n", "printf ('We do not take NaCl since it does not react with lime/soda');\n", "V=1000000;//volume of water in litres//\n", "L=0.74*(P1+2*P2+P3+P4+P5+P7)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.f g',L);\n", "S=1.06*(P3+P4+P6+P7)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.2: hardness_calculation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.8 example 2//\n", "clc\n", "W1=7.1;//Mg(HCO3)2 in water in mg/L//\n", "W2=8.1;//Ca(HCO3)2 in water in mg/L//\n", "W3=4.2;//MgCO3 in water in mg/L//\n", "W4=10;//CaCO3 in water in mg/L//\n", "W5=24;//MgSO4 in water in mg/L//\n", "M1=100/146;//multiplication factor of Mg(HCO3)2//\n", "M2=100/162;//multiplication factor of Ca(HCO3)2//\n", "M3=100/84;//multiplication factor of MgCO3//\n", "M4=100/100;//multiplication factor of CaCO3//\n", "M5=100/120;//multiplication factor of MgSO4//\n", "P1=W1*M1;//Mg(HCO3)2 in terms of CaCO3//\n", "P2=W2*M2;//Ca(HCO3)2 in terms of CaCO3//\n", "P3=W3*M3;//MgCO3 in terms of CaCO3//\n", "P4=W4*M4;//CaCO3 in terms of CaCO3//\n", "P5=W5*M5;//MgSO4 in terms of CaCO3//\n", "C=P1+P2+P3+P4;\n", "printf('\nCarbonate hardness is %.0f ppm',C);\n", "NC=P5;\n", "printf('\nNon-Carbonate hardness is %.0f ppm',NC);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.30: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.42 example 14//\n", "clc \n", "Purity_Lime=1\n", "Purity_soda=1\n", "W1=222;//amount of CaCl2 in ppm//\n", "W2=296;//amount of Mg(NO3)2 in ppm//\n", "W3=324;//amount of Ca(HCO3)2 in ppm//\n", "W4=196;//amount of H2SO4 in ppm//\n", "M1=100/111;//multiplication factor of CaCl2//\n", "M2=100/148;//multiplication factor of Ca(HCO3)2//\n", "M3=100/162;//multiplication factor of MgCO3//\n", "M4=100/98;//multiplication factor of H2SO4//\n", "P1=W1*M1;//in terms of CaCO3//S\n", "P2=W2*M2;//in terms of CaCO3//L+S\n", "P3=W3*M3;//in terms of CaCO3//L\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "printf ('We do not take organic matter since it does not react with lime/soda');\n", "V=50000;//volume of water in litres//\n", "L=0.74*(P2+P3+P4)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.f g',L);\n", "S=1.06*(P1+P2+P4)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.31: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.43 example 15//\n", "clc \n", "Purity_Lime=.85\n", "Purity_soda=.95\n", "W1=12.5;//amount of CaCO3 in ppm//\n", "W2=8.4;//amount of MgCO3 in ppm//\n", "W3=22.2;//amount of CaCl2 in ppm//\n", "W4=9.5;//amount of MgCl2 in ppm//\n", "W5=33;//amount of CO2 in ppm//\n", "W6=7.3;//amount of HCl in ppm//\n", "W7=16.8;//amount of NaHCO3 in ppm//\n", "M1=100/100;//multiplication factor of CaCO3//\n", "M2=100/84;//multiplication factor of MgCO3//\n", "M3=100/111;//multiplication factor of CaCl2//\n", "M4=100/95;//multiplication factor of MgCl2//\n", "M5=100/44;//multiplication factor of CO2//\n", "M6=100/73;//multiplication factor of HCl//\n", "M7=100/168;//multiplication factor of NaHCO3//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//2*L\n", "P3=W3*M3;//in terms of CaCO3//S\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "P5=W5*M5;//in terms of CaCO3//L\n", "P6=W6*M6;//in terms of CaCO3//L+S\n", "P7=W7*M7;//in terms of CaCO3//L-S\n", "V=1000000;//volume of water in litres//\n", "L=0.74*(P1+2*P2+P4+P5+P6+P7)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.f g',L);\n", "S=1.06*(P3+P4+P6-P7)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.32: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.44 example 16//\n", "clc \n", "Purity_Lime=1\n", "Purity_soda=1\n", "W1=8.1;//amount of Ca(HCO3)2 in ppm//\n", "W2=7.5;//amount of Mg(HCO3)2 in ppm//\n", "W3=13.6;//amount of CaSO4 in ppm//\n", "W4=12;//amount of MgSO4 in ppm//\n", "W5=2;//amount of MgCl2 in ppm//\n", "M1=100/162;//multiplication factor of Ca(HCO3)2//\n", "M2=100/146;//multiplication factor of Mg(HCO3)2//\n", "M3=100/136;//multiplication factor of CaSO4//\n", "M4=100/120;//multiplication factor of MgSO4//\n", "M5=100/95;//multiplication factor of MgCl2//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//2*L\n", "P3=W3*M3;//in terms of CaCO3//S\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "P5=W5*M5;//in terms of CaCO3//S\n", "printf ('We do not take NaCl since it does not react with lime/soda');\n", "V=50000;//volume of water in litres//\n", "L=0.74*(P1+2*P2+P4+P5)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.2f g',L);\n", "S=1.06*(P3+P4+P5)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.2f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.33: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.45 example 17//\n", "clc \n", "Purity_Lime=.9\n", "Purity_soda=.95\n", "W1=155;//amount of Mg(HCO3)2 in ppm//\n", "W2=23;//amount of MgCl2 in ppm//\n", "W3=5;//amount of H2SO4 in ppm//\n", "W4=111;//amount of CaCl2 in ppm//\n", "M1=100/146;//multiplication factor of Mg(HCO3)2//\n", "M2=100/95;//multiplication factor of MgCl2//\n", "M3=100/98;//multiplication factor of H2SO4//\n", "M4=100/111;//multiplication factor of CaCl2//\n", "P1=W1*M1;//in terms of CaCO3//2*L\n", "P2=W2*M2;//in terms of CaCO3//L+S\n", "P3=W3*M3;//in terms of CaCO3//L+S\n", "P4=W4*M4;//in terms of CaCO3//S\n", "printf ('We do not take NaCl and Na2SO4 since they do not react with lime/soda');\n", "V=50000;//volume of water in litres//\n", "L=0.74*(2*P1+P2+P3)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.2f g',L);//Final answer in book is incorrect//\n", "S=1.06*(P2+P3+P4)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.2f g',S)//Final answer in book is incorrect//" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.34: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.45 example 18//\n", "clc \n", "Purity_Lime=.9\n", "Purity_soda=.95\n", "W1=81;//amount of Ca(HCO3)2 in ppm//\n", "W2=95;//amount of MgCl2 in ppm//\n", "W3=68;//amount of CaSO4 in ppm//\n", "W4=146;//amount of Mg(HCO3)2 in ppm//\n", "W5=49;//amount of H2SO4 in ppm//\n", "M1=100/162;//multiplication factor of Ca(HCO3)2//\n", "M2=100/95;//multiplication factor of MgCl2//\n", "M3=100/136;//multiplication factor of CaSO4//\n", "M4=100/146;//multiplication factor of Mg(HCO3)2//\n", "M5=100/98;//multiplication factor of H2SO4//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//L+S\n", "P3=W3*M3;//in terms of CaCO3//S\n", "P4=W4*M4;//in terms of CaCO3//2*L\n", "P5=W5*M5;//in terms of CaCO3//L+S\n", "printf ('We do not take SiO2 since it does not react with lime/soda');\n", "V=50000;//volume of water in litres//\n", "L=0.74*(P1+P2+2*P4+P5)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.2f g',L);\n", "S=1.06*(P2+P3+P5)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.2f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.35: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.46 example 19//\n", "clc \n", "Purity_Lime=.95\n", "Purity_soda=.9\n", "W1=81;//amount of Ca(HCO3)2 in ppm//\n", "W2=73;//amount of Mg(HCO3)2 in ppm//\n", "W3=68;//amount of CaSO4 in ppm//\n", "W4=95;//amount of MgCl2 in ppm//\n", "W5=14.8;//amount of Mg(NO3)2 in ppm//\n", "W6=14.7;//amount of H2SO4 in ppm//\n", "M1=100/162;//multiplication factor of Ca(HCO3)2//\n", "M2=100/146;//multiplication factor of Mg(HCO3)2//\n", "M3=100/136;//multiplication factor of CaSO4//\n", "M4=100/95;//multiplication factor of MgCl2//\n", "M5=100/148;//multiplication factor of Mg(NO3)2//\n", "M6=100/98;//multiplication factor of H2SO4//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//2*L\n", "P3=W3*M3;//in terms of CaCO3//S\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "P5=W5*M5;//in terms of CaCO3//L+S\n", "P6=W6*M6;//in terms of CaCO3//L+S\n", "V=1000000;//volume of water in litres//\n", "L=0.74*(P1+2*P2+P4+P5+P6)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.1f g',L);\n", "S=1.06*(P3+P4+P5+P6)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.1f g',S);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.36: calculation_of_hardness_using_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.50 example 1//\n", "clc\n", "volume_hardwater=10000//in litres//\n", "volume_NaCl=5000//Volume of NaCl in litres//\n", "conc_NaCl=1170/10000//% NaCl consumed by zeolite bed//\n", "Wt_per_Litre=conc_NaCl*10//gms NaCl consumed by zeolite bed per litre//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.5//in terms of (gms/lit)//\n", "H=CaCO3_equivalent/volume_hardwater//Hardness of water(gms/lit)//\n", "Hardness=H*1000//Hardness of water(mg/lit) or ppm//\n", "printf('\nHardness of water sample is %.f ppm',Hardness);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.37: calculation_of_hardness_using_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.50 example 2//\n", "clc\n", "volume_hardwater=75000//in litres//\n", "volume_NaCl=1500//Volume of NaCl in litres//\n", "conc_NaCl=1.170/100//% NaCl consumed by zeolite bed//\n", "Wt_per_Litre=conc_NaCl*10//gms NaCl consumed by zeolite bed per litre//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.5//in terms of (gms/lit)//\n", "H=CaCO3_equivalent/volume_hardwater//Hardness of water(gms/lit)//\n", "Hardness=H*1000//Hardness of water(mg/lit) or ppm//\n", "printf('\nHardness of water sample is %.f ppm',Hardness);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.38: Hardwater_quantity_softened_using_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.51 example 3//\n", "clc\n", "Hardness=300//Hardness of water(mg/lit) or ppm//\n", "H=Hardness/100//Hardness of water(gms/lit)//\n", "volume_NaCl=75//Volume of NaCl//\n", "conc_NaCl=75//% NaCl consumed by zeolite bed//\n", "Wt_per_Litre=conc_NaCl*10//gms NaCl consumed by zeolite bed per litre//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.5//in terms of (gms/lit)//\n", "volume_hardwater=CaCO3_equivalent/H\n", "printf('\nQuantity of water softened using zeolite bed is %.f litres',volume_hardwater);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.39: Hardwater_quantity_softened_using_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.51 example 4//\n", "clc\n", "Hardness=400//Hardness of water(mg/lit) or ppm//\n", "H=Hardness/100//Hardness of water(gms/lit)//\n", "volume_NaCl=100//Volume of NaCl//\n", "conc_NaCl=60//% NaCl consumed by zeolite bed//\n", "Wt_per_Litre=conc_NaCl*10//gms NaCl consumed by zeolite bed per litre//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.5//in terms of (gms/lit)//\n", "volume_hardwater=CaCO3_equivalent/H\n", "printf('\nQuantity of water softened using zeolite bed is %.f litres',volume_hardwater);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.3: hardness_calculation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.9 example 3//\n", "clc\n", "W1=150;//Ca2+ in water in mg/L//\n", "W2=60;//Mg2+ in water in mg/L//\n", "M1=100/40;//multiplication factor of Ca2+//\n", "M2=100/24;//multiplication factor of Mg2+//\n", "P1=W1*M1;//Ca2+ in terms of CaCO3//\n", "P2=W2*M2;//Mg2+ in terms of CaCO3//\n", "T=P1+P2;\n", "printf('\nTotal hardness is %.0f mg/L',T);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.40: calculation_of_hardness_using_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.52 example 5//\n", "clc\n", "volume_hardwater=100000//in litres//\n", "volume_NaCl=400//Volume of NaCl in litres//\n", "conc_NaCl=100//% NaCl consumed by zeolite bed//\n", "Wt_per_Litre=conc_NaCl*10//gms NaCl consumed by zeolite bed per litre//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.5//in terms of (gms/lit)//\n", "H=CaCO3_equivalent/volume_hardwater//Hardness of water(gms/lit)//\n", "Hardness=H*100//Hardness of water(mg/lit) or ppm//\n", "printf('\nHardness of water sample is %.1f mg/L',Hardness);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.41: calculation_of_hardness_using_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.52 example 6//\n", "clc\n", "volume_hardwater=800//in litres//\n", "volume_NaCl=40//Volume of NaCl in litres//\n", "conc_NaCl=110//% NaCl consumed by zeolite bed//\n", "Wt_per_Litre=conc_NaCl*10//gms NaCl consumed by zeolite bed per litre//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.5//in terms of (gms/lit)//\n", "H=CaCO3_equivalent/volume_hardwater//Hardness of water(gms/lit)//\n", "Hardness=H*100//Hardness of water(mg/lit) or ppm//\n", "printf('\nHardness of water sample is %.2f ppm',Hardness);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.42: NaCl_required_for_zeolite_bed_regeneration.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.53 example 7//\n", "clc\n", "volume_hardwater=1//in litres//\n", "CaCl2=4.5//Hardness of water(gms/lit)//\n", "moles_NaCl=2;//Na3Ze giving NaCl and CaZe//\n", "mol_wt_NaCl=58.5;\n", "mol_wt_Na3Ze=111;\n", "NaCl=CaCl2*moles_NaCl*mol_wt_NaCl/mol_wt_Na3Ze;\n", "printf('\Quantity of NaCl produced is %.2f gm',NaCl);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.43: Hardwater_quantity_softened_using_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.53 example 8//\n", "clc\n", "Hardness=500//Hardness of water(mg/lit) or ppm//\n", "H=Hardness/100//Hardness of water(gms/lit)//\n", "volume_NaCl=100//Volume of NaCl//\n", "conc_NaCl=120//% NaCl consumed by zeolite bed//\n", "Wt_per_Litre=conc_NaCl*10//gms NaCl consumed by zeolite bed per litre//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.48//in terms of (gms/lit)//\n", "volume_hardwater=CaCO3_equivalent/H\n", "printf('\nQuantity of water softened using zeolite bed is %.f litres',volume_hardwater);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.44: calculation_of_hardness_using_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.54 example 9//\n", "clc\n", "volume_hardwater=4500//in litres//\n", "volume_NaCl=30//Volume of NaCl in litres//\n", "Wt_per_Litre=100//% NaCl consumed by zeolite bed//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.55//in terms of (gms/lit)//\n", "H=CaCO3_equivalent/volume_hardwater//Hardness of water(gms/lit)//\n", "Hardness=H*1000//Hardness of water(mg/lit) or ppm//\n", "printf('\nHardness of water sample is %.f ppm',Hardness);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.45: calculation_of_hardness_using_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.54 example 10//\n", "clc\n", "volume_hardwater=3500//in litres//\n", "volume_NaCl=25//Volume of NaCl in litres//\n", "Wt_per_Litre=100//% NaCl consumed by zeolite bed//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.5//in terms of (gms/lit)//\n", "H=CaCO3_equivalent/volume_hardwater//Hardness of water(gms/lit)//\n", "Hardness=H*1000//Hardness of water(mg/lit) or ppm//\n", "printf('\nHardness of water sample is %.1f ppm',Hardness);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.46: calculation_of_hardness_using_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.55 example 11//\n", "clc\n", "volume_hardwater=15000//in litres//\n", "volume_NaCl=120//Volume of NaCl in litres//\n", "Wt_per_Litre=30//% NaCl consumed by zeolite bed//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.5//in terms of (gms/lit)//\n", "H=CaCO3_equivalent/volume_hardwater//Hardness of water(gms/lit)//\n", "Hardness=H*1000//Hardness of water(mg/lit) or ppm//\n", "printf('\nHardness of water sample is %.1f ppm',Hardness);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.47: Hardwater_quantity_softened_using_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.55 example 12//\n", "clc\n", "Hardness=480//Hardness of water(mg/lit) or ppm//\n", "H=Hardness/100//Hardness of water(gms/lit)//\n", "volume_NaCl=300//Volume of NaCl//\n", "conc_NaCl=150//% NaCl consumed by zeolite bed//\n", "Wt_per_Litre=conc_NaCl*10//gms NaCl consumed by zeolite bed per litre//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.5//in terms of (gms/lit)//\n", "volume_hardwater=CaCO3_equivalent/H\n", "printf('\nQuantity of water softened using zeolite bed is %.f litres',volume_hardwater);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.48: calculation_of_hardness_using_ion_exchange_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.59 example 1//\n", "clc\n", "volume_water=10^4//in litres//\n", "volume_HCl=200//in litres//\n", "conc_HCl=0.1//in Normals//\n", "totl_hardness=volume_HCl*conc_HCl*50//in terms of g CaCO3 equivalent//\n", "h=totl_hardness/volume_water//in terms of g CaCO3 equivalent//\n", "printf('\nHardness of water sample is %.f mg/L',h*1000);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.49: calculation_of_BOD.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.72 example 1//\n", "clc\n", "vol_init=50//initial volume of sample in ml//\n", "vol_fin=80//final volume of sample in ml//\n", "DOb=840//dissolved O2 present in effluent sample before incubation in ppm//\n", "DOi=230//dissolved O2 present in effluent sample after incubation in ppm//\n", "DF=vol_fin/vol_init//dilution factor//\n", "BOD=(DOb-DOi)*DF//in ppm//\n", "printf('\nBiological Oxygen Demand(BOD) of the sample is %.f ppm',BOD);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.4: calculation_of_Fe2O3_required.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.9 example 4//\n", "clc\n", "H=210.5;//hardness in ppm//\n", "M1=100;//molecular weight of CaCO3//\n", "M2=136;//molecular weight of FeSO4//\n", "M=M1/M2;//multiplication factor of FeSO4//\n", "W=H/M;//weight of FeSO4 required//\n", "printf('\nFeSO4 required is %.1f ppm',W);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.50: calculation_of_COD.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.73 example 2//\n", "clc\n", "Vb=27//volume of ferrous ammonium sulphate in blank experiment in ml//\n", "Vt=6.5//volume of ferrous ammonium sulphate in test experiment in ml//\n", "N=0.1//concentration in Normals//\n", "Ve=25//volume of water sample taken in test in ml//\n", "COD=(Vb-Vt)*N*8/Ve//in ppm//\n", "printf('\nChemical Oxygen Demand(COD) of the sample is %.3f ppm',COD);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.51: hardness_calculation_using_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.84 example 2//\n", "clc\n", "volume_hardwater=800//in litres//\n", "volume_NaCl=40//Volume of NaCl in litres//\n", "conc_NaCl=110//% NaCl consumed by zeolite bed//\n", "Wt_per_Litre=conc_NaCl*10//gms NaCl consumed by zeolite bed per litre//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.5//in terms of (gms/lit)//\n", "H=CaCO3_equivalent/volume_hardwater//Hardness of water(gms/lit)//\n", "Hardness=H*100//Hardness of water(mg/lit) or ppm//\n", "printf('\nHardness of water sample is %.2f ppm',Hardness);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.52: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.84 example 3//\n", "clc \n", "Purity_Lime=.9\n", "Purity_soda=.95\n", "W1=81;//amount of Ca(HCO3)2 in ppm//\n", "W2=42;//amount of MgCO3 in ppm//\n", "W3=4.1;//amount of NaAlO2 in ppm//\n", "W4=3.65;//amount of HCl in ppm//\n", "W5=82;//amount of Ca(NO3)2 in ppm//\n", "M1=100/162;//multiplication factor of Ca(HCO3)2//\n", "M2=100/84;//multiplication factor of MgCO3//\n", "M3=100/82;//multiplication factor of NaAlO2//\n", "M4=100/36.5;//multiplication factor of HCl//\n", "M5=100/164;//multiplication factor of Ca(NO3)2//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//2*L\n", "P3=W3*M3;//in terms of CaCO3//-L\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "P5=W5*M5;//in terms of CaCO3//S\n", "printf ('We do not take NaCl since it does not react with lime/soda');\n", "V=20000;//volume of water in litres//\n", "L=0.74*(P1+2*P2+P4-P3)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.2f g',L);\n", "S=1.06*(P4+P5)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.3f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.53: hardness_calculation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.84 example 1//\n", "clc\n", "W1=32.4;//Ca(HCO3)2 in water in mg/L//\n", "W2=29.2;//Mg(HCO3)2 in water in mg/L//\n", "W3=13.6;//CaSO4 in water in mg/L//\n", "M1=100/162;//multiplication factor of Ca(HCO3)2//\n", "M2=100/146;//multiplication factor of Mg(HCO3)2//\n", "M3=100/136;//multiplication factor of CaSO4//\n", "P1=W1*M1;//Ca(HCO3)2 in terms of CaCO3//\n", "P2=W2*M2;//Mg(HCO3)2 in terms of CaCO3//\n", "P3=W3*M3;//CaSO4 in terms of CaCO3//\n", "T=P1+P2;\n", "printf('\nTemporary hardness is %.0f ppm',T);\n", "P=P3;\n", "printf('\nPermanant hardness is %.0f ppm',P);\n", "To=T+P;\n", "printf('\nTotal hardness is %.0f ppm',To);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.54: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.85 example 3//\n", "clc \n", "Purity_Lime=.85\n", "Purity_soda=.9\n", "W1=16.2;//amount of Ca(HCO3)2 in ppm//\n", "W2=6.8;//amount of CaSO4 in ppm//\n", "W3=11.1;//amount of CaCl2 in ppm//\n", "W4=6;//amount of MgSO4 in ppm//\n", "W5=8.4;//amount of Mg(HCO3)2 in ppm//\n", "M1=100/162;//multiplication factor of Ca(HCO3)2//\n", "M2=100/136;//multiplication factor of CaSO4//\n", "M3=100/111;//multiplication factor of CaCl2//\n", "M4=100/120;//multiplication factor of MgSO4//\n", "M5=100/146;//multiplication factor of Mg(HCO3)2//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//S\n", "P3=W3*M3;//in terms of CaCO3//S\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "P5=W5*M5;//in terms of CaCO3//2*L\n", "printf ('We do not take NaCl since it does not react with lime/soda');\n", "V=10000;//volume of water in litres//\n", "L=0.74*(P1+P4+2*P5)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.1f g',L);\n", "S=1.06*(P2+P3+P4)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.2f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.55: hardness_calculation_by_EDTA_method.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.85 example 4//\n", "clc\n", "conc_SH=15/1000//in terms of g/lit//\n", "strength_SH=conc_SH*1000//in terms of mgs/lit//\n", "volume_SH=20//in terms of ml//\n", "volume_H=100//in terms of ml//\n", "EDTA_SH=25//volume for Std hardwater(ml)//\n", "EDTA_H=18//volume for sample hardwater(ml)//\n", "AB_EDTA=12//volume required after boiling(ml)//\n", "CaCO3_equivalent_SH=strength_SH*volume_SH//in terms of CaCO3 equivalent//\n", "one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH//in terms of CaCO3 equivalent//\n", "To_sample=one_ml_EDTA*EDTA_H/volume_H//total hardness for given volume//\n", "To=To_sample*1000//total hardness per litre(ppm)//\n", "P_sample=AB_EDTA*one_ml_EDTA/volume_H//permanent hardness for given volume//\n", "P=P_sample*1000//permanent hardness per litre(ppm)//\n", "T=To-P\n", "printf('\nTotal Hardness is %.f ppm',To);\n", "printf('\nPermanent Hardness is %.f ppm',P);\n", "printf('\nTemporary Hardness is %.f ppm',T);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.56: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.85 example 2//\n", "clc \n", "Purity_Lime=.7\n", "Purity_soda=.85\n", "W1=30.2;//amount of Ca(HCO3)2 in ppm//\n", "W2=20.8;//amount of Mg(HCO3)2 in ppm//\n", "W3=28.31;//amount of CaCl2 in ppm//\n", "W4=8.7;//amount of MgCl2 in ppm//\n", "W5=35;//amount of CaSO4 in ppm//\n", "W6=6.7;//amount of MgSO4 in ppm//\n", "M1=100/162;//multiplication factor of Ca(HCO3)2//\n", "M2=100/146;//multiplication factor of Mg(HCO3)2//\n", "M3=100/111;//multiplication factor of CaCl2//\n", "M4=100/95;//multiplication factor of MgCl2//\n", "M5=100/136;//multiplication factor of CaSO4//\n", "M6=100/120;//multiplication factor of MgSO4//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//2*L\n", "P3=W3*M3;//in terms of CaCO3//S\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "P5=W5*M5;//in terms of CaCO3//S\n", "P6=W6*M6;//in terms of CaCO3//L+S\n", "printf ('We do not take Na2SO4 since it does not react with lime/soda');\n", "V=100000;//volume of water in litres//\n", "L=0.74*(P1+2*P2+P4+P6)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.1f g',L);\n", "S=1.06*(P3+P4+P5+P6)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.57: NaCl_quantity_produced_in_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.85 example 1//\n", "clc\n", "volume_hardwater=1//in litres//\n", "CaCl2=4.5//Hardness of water(gms/lit)//\n", "moles_NaCl=2;//Na3Ze giving NaCl and CaZe//\n", "mol_wt_NaCl=58.5;\n", "mol_wt_Na3Ze=111;\n", "NaCl=CaCl2*moles_NaCl*mol_wt_NaCl/mol_wt_Na3Ze;\n", "printf('\Quantity of NaCl produced is %.2f gm',NaCl);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.58: hardness_calculation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.86 example 1//\n", "clc\n", "W1=14.6;//Mg(HCO3)2 in water in mg/L//\n", "W2=8.1;//Ca(HCO3)2 in water in mg/L//\n", "W3=29.6;//Mg(NO3)2 in water in mg/L//\n", "W4=19;//MgCl2 in water in mg/L//\n", "W5=24;//MgSO4 in water in mg/L//\n", "M1=100/146;//multiplication factor of Mg(HCO3)2//\n", "M2=100/162;//multiplication factor of Ca(HCO3)2//\n", "M3=100/148;//multiplication factor of Mg(NO3)2//\n", "M4=100/95;//multiplication factor of MgCl2//\n", "M5=100/120;//multiplication factor of MgSO4//\n", "P1=W1*M1;//Mg(HCO3)2 in terms of CaCO3//\n", "P2=W2*M2;//Ca(HCO3)2 in terms of CaCO3//\n", "P3=W3*M3;//Mg(NO3)2 in terms of CaCO3//\n", "P4=W4*M4;//MgCl2 in terms of CaCO3//\n", "P5=W5*M5;//MgSO4 in terms of CaCO3//\n", "T=P1+P2;\n", "printf('\nTemporary hardness is %.0f ppm',T);\n", "P=P3+P4+P5;\n", "printf('\nPermanant hardness is %.0f ppm',P);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.59: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.86 example 3//\n", "clc \n", "Purity_Lime=.8\n", "Purity_soda=.85\n", "W1=162;//amount of Ca(HCO3)2 in ppm//\n", "W2=7.3;//amount of Mg(HCO3)2 in ppm//\n", "W3=9.5;//amount of MgCl2 in ppm//\n", "W4=36.5;//amount of HCl in ppm//\n", "W5=44;//amount of CO2 in ppm//\n", "W6=111;//amount of CaCl2 in ppm//\n", "W7=60;//amount of MgSO4 in ppm//\n", "M1=100/162;//multiplication factor of Ca(HCO3)2//\n", "M2=100/146;//multiplication factor of Mg(HCO3)2//\n", "M3=100/95;//multiplication factor of MgCl2//\n", "M4=100/73;//multiplication factor of HCl//\n", "M5=100/44;//multiplication factor of CO2//\n", "M6=100/111;//multiplication factor of CaCl2//\n", "M7=100/120;//multiplication factor of MgSO4//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//2*L\n", "P3=W3*M3;//in terms of CaCO3//L+S\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "P5=W5*M5;//in terms of CaCO3//L\n", "P6=W6*M6;//in terms of CaCO3//S\n", "P7=W7*M7;//in terms of CaCO3//L+S\n", "printf ('We do not take NaCl since it does not react with lime/soda');\n", "V=1000000;//volume of water in litres//\n", "L=0.74*(P1+2*P2+P3+P4+P5+P7)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.f g',L);\n", "S=1.06*(P3+P4+P6+P7)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.5: hardness_calculation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.10 example 5//\n", "clc\n", "W1=32.4;//Ca(HCO3)2 in water in mg/L//\n", "W2=29.2;//Mg(HCO3)2 in water in mg/L//\n", "W3=13.6;//CaSO4 in water in mg/L//\n", "M1=100/162;//multiplication factor of Ca(HCO3)2//\n", "M2=100/146;//multiplication factor of Mg(HCO3)2//\n", "M3=100/136;//multiplication factor of CaSO4//\n", "P1=W1*M1;//Ca(HCO3)2 in terms of CaCO3//\n", "P2=W2*M2;//Mg(HCO3)2 in terms of CaCO3//\n", "P3=W3*M3;//CaSO4 in terms of CaCO3//\n", "T=P1+P2;\n", "printf('\nTemporary hardness is %.0f ppm',T);\n", "P=P3;\n", "printf('\nPermanant hardness is %.0f ppm',P);\n", "To=T+P;\n", "printf('\nTotal hardness is %.0f ppm',To);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.60: hardness_calculation_by_EDTA_method.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.86 example 4//\n", "clc\n", "conc_SH=0.5/500//in terms of g/lit//\n", "strength_SH=conc_SH*1000//in terms of mgs/lit//\n", "volume_SH=50//in terms of ml//\n", "volume_H=50//in terms of ml//\n", "EDTA_SH=48//volume for Std hardwater(ml)//\n", "EDTA_H=15//volume for sample hardwater(ml)//\n", "AB_EDTA=10//volume required after boiling(ml)//\n", "CaCO3_equivalent_SH=strength_SH*volume_SH//in terms of CaCO3 equivalent//\n", "one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH//in terms of CaCO3 equivalent//\n", "To_sample=one_ml_EDTA*EDTA_H/volume_H//total hardness for given volume//\n", "To=To_sample*1000//total hardness per litre(ppm)//\n", "P_sample=AB_EDTA*one_ml_EDTA/volume_H//permanent hardness for given volume//\n", "P=P_sample*1000//permanent hardness per litre(ppm)//\n", "T=To-P\n", "printf('\nTotal Hardness is %.1f ppm',To);\n", "printf('\nPermanent Hardness is %.2f ppm',P);\n", "printf('\nTemporary Hardness is %.2f ppm',T);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.61: hardness_calculation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.87 example 1//\n", "clc\n", "W1=7.3;//Mg(HCO3)2 in water in mg/L//\n", "W2=9.5;//MgCl2 in water in mg/L//\n", "W3=16.2;//Ca(HCO3)2 in water in mg/L//\n", "W4=13.6;//CaSO4 in water in mg/L//\n", "M1=100/146;//multiplication factor of Mg(HCO3)2//\n", "M2=100/95;//multiplication factor of MgCl2//\n", "M3=100/162;//multiplication factor of Ca(HCO3)2//\n", "M4=100/136;//multiplication factor of CaSO4//\n", "P1=W1*M1;//Mg(HCO3)2 in terms of CaCO3//\n", "P2=W2*M2;//MgCl2 in terms of CaCO3//\n", "P3=W3*M3;//Ca(HCO3)2 in terms of CaCO3//\n", "P4=W4*M4;//CaSO4 in terms of CaCO3//\n", "T=P1+P3;\n", "printf('\nTemporary hardness is %.0f ppm',T);\n", "P=P2+P4;\n", "printf('\nPermanant hardness is %.0f ppm',P);\n", "To=T+P;\n", "printf('\nTotal hardness is %.0f ppm',To);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.62: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.87 example 2//\n", "clc \n", "Purity_Lime=1\n", "Purity_soda=1\n", "W1=222;//amount of CaCl2 in ppm//\n", "W2=296;//amount of Mg(NO3)2 in ppm//\n", "W3=324;//amount of Ca(HCO3)2 in ppm//\n", "W4=196;//amount of H2SO4 in ppm//\n", "M1=100/111;//multiplication factor of CaCl2//\n", "M2=100/148;//multiplication factor of Ca(HCO3)2//\n", "M3=100/162;//multiplication factor of MgCO3//\n", "M4=100/98;//multiplication factor of H2SO4//\n", "P1=W1*M1;//in terms of CaCO3//S\n", "P2=W2*M2;//in terms of CaCO3//L+S\n", "P3=W3*M3;//in terms of CaCO3//L\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "printf ('We do not take organic matter since it does not react with lime/soda');\n", "V=50000;//volume of water in litres//\n", "L=0.74*(P2+P3+P4)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.f g',L);\n", "S=1.06*(P1+P2+P4)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.63: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.87 example 3//\n", "clc \n", "Purity_Lime=.85\n", "Purity_soda=.95\n", "W1=12.5;//amount of CaCO3 in ppm//\n", "W2=8.4;//amount of MgCO3 in ppm//\n", "W3=22.2;//amount of CaCl2 in ppm//\n", "W4=9.5;//amount of MgCl2 in ppm//\n", "W5=33;//amount of CO2 in ppm//\n", "W6=7.3;//amount of HCl in ppm//\n", "W7=16.8;//amount of NaHCO3 in ppm//\n", "M1=100/100;//multiplication factor of CaCO3//\n", "M2=100/84;//multiplication factor of MgCO3//\n", "M3=100/111;//multiplication factor of CaCl2//\n", "M4=100/95;//multiplication factor of MgCl2//\n", "M5=100/44;//multiplication factor of CO2//\n", "M6=100/73;//multiplication factor of HCl//\n", "M7=100/168;//multiplication factor of NaHCO3//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//2*L\n", "P3=W3*M3;//in terms of CaCO3//S\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "P5=W5*M5;//in terms of CaCO3//L\n", "P6=W6*M6;//in terms of CaCO3//L+S\n", "P7=W7*M7;//in terms of CaCO3//L-S\n", "V=1000000;//volume of water in litres//\n", "L=0.74*(P1+2*P2+P4+P5+P6+P7)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.f g',L);\n", "S=1.06*(P3+P4+P6-P7)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.64: Hardwater_quantity_softened_using_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.87 example 4//\n", "clc\n", "Hardness=500//Hardness of water(mg/lit) or ppm//\n", "H=Hardness/100//Hardness of water(gms/lit)//\n", "volume_NaCl=100//Volume of NaCl//\n", "conc_NaCl=120//% NaCl consumed by zeolite bed//\n", "Wt_per_Litre=conc_NaCl*10//gms NaCl consumed by zeolite bed per litre//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.48//in terms of (gms/lit)//\n", "volume_hardwater=CaCO3_equivalent/H\n", "printf('\nQuantity of water softened using zeolite bed is %.f litres',volume_hardwater);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.65: calculation_of_hardness_using_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.88 example 3//\n", "clc\n", "volume_hardwater=4500//in litres//\n", "volume_NaCl=30//Volume of NaCl in litres//\n", "Wt_per_Litre=100//% NaCl consumed by zeolite bed//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.55//in terms of (gms/lit)//\n", "H=CaCO3_equivalent/volume_hardwater//Hardness of water(gms/lit)//\n", "Hardness=H*1000//Hardness of water(mg/lit) or ppm//\n", "printf('\nHardness of water sample is %.f ppm',Hardness);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.66: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.88 example 4//\n", "clc \n", "Purity_Lime=1\n", "Purity_soda=1\n", "W1=8.1;//amount of Ca(HCO3)2 in ppm//\n", "W2=7.5;//amount of Mg(HCO3)2 in ppm//\n", "W3=13.6;//amount of CaSO4 in ppm//\n", "W4=12;//amount of MgSO4 in ppm//\n", "W5=2;//amount of MgCl2 in ppm//\n", "M1=100/162;//multiplication factor of Ca(HCO3)2//\n", "M2=100/146;//multiplication factor of Mg(HCO3)2//\n", "M3=100/136;//multiplication factor of CaSO4//\n", "M4=100/120;//multiplication factor of MgSO4//\n", "M5=100/95;//multiplication factor of MgCl2//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//2*L\n", "P3=W3*M3;//in terms of CaCO3//S\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "P5=W5*M5;//in terms of CaCO3//S\n", "printf ('We do not take NaCl since it does not react with lime/soda');\n", "V=50000;//volume of water in litres//\n", "L=0.74*(P1+2*P2+P4+P5)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.2f g',L);\n", "S=1.06*(P3+P4+P5)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.2f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.67: hardness_calculation_by_EDTA_method.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.88 example 4//\n", "clc\n", "conc_SH=1/1000//in terms of g/lit//\n", "strength_SH=conc_SH*1000//in terms of mgs/lit//\n", "volume_SH=50//in terms of ml//\n", "volume_H=50//in terms of ml//\n", "EDTA_SH=45//volume for Std hardwater(ml)//\n", "EDTA_H=25//volume for sample hardwater(ml)//\n", "AB_EDTA=15//volume required after boiling(ml)//\n", "CaCO3_equivalent_SH=strength_SH*volume_SH//in terms of CaCO3 equivalent//\n", "one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH//in terms of CaCO3 equivalent//\n", "To_sample=one_ml_EDTA*EDTA_H/volume_H//total hardness for given volume//\n", "To=To_sample*1000//total hardness per litre(ppm)//\n", "P_sample=AB_EDTA*one_ml_EDTA/volume_H//permanent hardness for given volume//\n", "P=P_sample*1000//permanent hardness per litre(ppm)//\n", "T=To-P\n", "printf('\nTotal Hardness is %.2f ppm',To);\n", "printf('\nPermanent Hardness is %.2f ppm',P);\n", "printf('\nTemporary Hardness is %.2f ppm',T);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.68: hardness_calculation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.89 example 1//\n", "clc\n", "W1=19;//MgCl2 in water in mg/L//\n", "W2=5;//CaCO3 in water in mg/L//\n", "W3=29.5;//Ca(HCO3)2 in water in mg/L//\n", "W4=13;//CaSO4 in water in mg/L//\n", "M1=100/95;//multiplication factor of MgCl2//\n", "M2=100/100;//multiplication factor of CaCO3//\n", "M3=100/162;//multiplication factor of Ca(HCO3)2//\n", "M4=100/136;//multiplication factor of CaSO4//\n", "P1=W1*M1;//MgCl2 in terms of CaCO3//\n", "P2=W2*M2;//CaCO3 in terms of CaCO3//\n", "P3=W3*M3;//Ca(HCO3)2 in terms of CaCO3//\n", "P4=W4*M4;//CaSO4 in terms of CaCO3//\n", "T=P2+P3;\n", "printf('\nTemporary hardness is %.2f ppm',T);\n", "P=P1+P4;\n", "printf('\nPermanant hardness is %.2f ppm',P);\n", "To=T+P;\n", "printf('\nTotal hardness is %.2f ppm',To);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.69: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.89 example 2//\n", "clc \n", "Purity_Lime=.9\n", "Purity_soda=.95\n", "W1=155;//amount of Mg(HCO3)2 in ppm//\n", "W2=23;//amount of MgCl2 in ppm//\n", "W3=5;//amount of H2SO4 in ppm//\n", "W4=111;//amount of CaCl2 in ppm//\n", "M1=100/146;//multiplication factor of Mg(HCO3)2//\n", "M2=100/95;//multiplication factor of MgCl2//\n", "M3=100/98;//multiplication factor of H2SO4//\n", "M4=100/111;//multiplication factor of CaCl2//\n", "P1=W1*M1;//in terms of CaCO3//2*L\n", "P2=W2*M2;//in terms of CaCO3//L+S\n", "P3=W3*M3;//in terms of CaCO3//L+S\n", "P4=W4*M4;//in terms of CaCO3//S\n", "printf ('We do not take NaCl and Na2SO4 since they do not react with lime/soda');\n", "V=50000;//volume of water in litres//\n", "L=0.74*(2*P1+P2+P3)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.2f g',L);\n", "S=1.06*(P2+P3+P4)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.2f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.6: hardness_calculation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.10 example 6//\n", "clc\n", "W1=14.6;//Mg(HCO3)2 in water in mg/L//\n", "W2=8.1;//Ca(HCO3)2 in water in mg/L//\n", "W3=29.6;//Mg(NO3)2 in water in mg/L//\n", "W4=19;//MgCl2 in water in mg/L//\n", "W5=24;//MgSO4 in water in mg/L//\n", "M1=100/146;//multiplication factor of Mg(HCO3)2//\n", "M2=100/162;//multiplication factor of Ca(HCO3)2//\n", "M3=100/148;//multiplication factor of Mg(NO3)2//\n", "M4=100/95;//multiplication factor of MgCl2//\n", "M5=100/120;//multiplication factor of MgSO4//\n", "P1=W1*M1;//Mg(HCO3)2 in terms of CaCO3//\n", "P2=W2*M2;//Ca(HCO3)2 in terms of CaCO3//\n", "P3=W3*M3;//Mg(NO3)2 in terms of CaCO3//\n", "P4=W4*M4;//MgCl2 in terms of CaCO3//\n", "P5=W5*M5;//MgSO4 in terms of CaCO3//\n", "T=P1+P2;\n", "printf('\nTemporary hardness is %.0f ppm',T);\n", "P=P3+P4+P5;\n", "printf('\nPermanant hardness is %.0f ppm',P);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.70: hardness_calculation_by_EDTA_method.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.89 example 3//\n", "clc\n", "conc_SH=1/20//in terms of g/lit//\n", "strength_SH=conc_SH*1000//in terms of mgs/lit//\n", "volume_SH=50//in terms of ml//\n", "volume_H=50//in terms of ml//\n", "EDTA_SH=1000//volume for Std hardwater(ml)//\n", "EDTA_H=7.2//volume for sample hardwater(ml)//\n", "AB_EDTA=4//volume required after boiling(ml)//\n", "CaCO3_equivalent_SH=strength_SH*volume_SH//in terms of CaCO3 equivalent//\n", "one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH//in terms of CaCO3 equivalent//\n", "To_sample=one_ml_EDTA*EDTA_H/volume_H//total hardness for given volume//\n", "To=To_sample*1000//total hardness per litre(ppm)//\n", "P_sample=AB_EDTA*one_ml_EDTA/volume_H//permanent hardness for given volume//\n", "P=P_sample*1000//permanent hardness per litre(ppm)//\n", "T=To-P\n", "printf('\nTotal Hardness is %.f ppm',To);\n", "printf('\nPermanent Hardness is %.f ppm',P);\n", "printf('\nTemporary Hardness is %.f ppm',T);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.71: hardness_calculation_by_Zeolite_method.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.89 example 4//\n", "clc\n", "volume_hardwater=3500//in litres//\n", "volume_NaCl=25//Volume of NaCl in litres//\n", "Wt_per_Litre=100//% NaCl consumed by zeolite bed//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.5//in terms of (gms/lit)//\n", "H=CaCO3_equivalent/volume_hardwater//Hardness of water(gms/lit)//\n", "Hardness=H*1000//Hardness of water(mg/lit) or ppm//\n", "printf('\nHardness of water sample is %.1f ppm',Hardness);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.72: hardness_calculation_by_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.90 example 5//\n", "clc\n", "volume_hardwater=15000//in litres//\n", "volume_NaCl=120//Volume of NaCl in litres//\n", "Wt_per_Litre=30//% NaCl consumed by zeolite bed//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.5//in terms of (gms/lit)//\n", "H=CaCO3_equivalent/volume_hardwater//Hardness of water(gms/lit)//\n", "Hardness=H*1000//Hardness of water(mg/lit) or ppm//\n", "printf('\nHardness of water sample is %.1f ppm',Hardness);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.73: hardness_calculation_by_EDTA_method.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.90 example 6//\n", "clc\n", "conc_SH=1.2/1000//in terms of g/lit//\n", "strength_SH=conc_SH*1000//in terms of mgs/lit//\n", "volume_SH=20//in terms of ml//\n", "volume_H=50//in terms of ml//\n", "EDTA_SH=35//volume for Std hardwater(ml)//\n", "EDTA_H=30//volume for sample hardwater(ml)//\n", "AB_EDTA=25//volume required after boiling(ml)//\n", "CaCO3_equivalent_SH=strength_SH*volume_SH//in terms of CaCO3 equivalent//\n", "one_ml_EDTA=CaCO3_equivalent_SH/EDTA_SH//in terms of CaCO3 equivalent//\n", "To_sample=one_ml_EDTA*EDTA_H/volume_H//total hardness for given volume//\n", "To=To_sample*1000//total hardness per litre(ppm)//\n", "P_sample=AB_EDTA*one_ml_EDTA/volume_H//permanent hardness for given volume//\n", "P=P_sample*1000//permanent hardness per litre(ppm)//\n", "T=To-P\n", "printf('\nTotal Hardness is %.f ppm',To);\n", "printf('\nPermanent Hardness is %.1f ppm',P);\n", "printf('\nTemporary Hardness is %.1f ppm',T);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.74: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.90 example 7//\n", "clc \n", "Purity_Lime=.9\n", "Purity_soda=.95\n", "W1=81;//amount of Ca(HCO3)2 in ppm//\n", "W2=95;//amount of MgCl2 in ppm//\n", "W3=68;//amount of CaSO4 in ppm//\n", "W4=146;//amount of Mg(HCO3)2 in ppm//\n", "W5=49;//amount of H2SO4 in ppm//\n", "M1=100/162;//multiplication factor of Ca(HCO3)2//\n", "M2=100/95;//multiplication factor of MgCl2//\n", "M3=100/136;//multiplication factor of CaSO4//\n", "M4=100/146;//multiplication factor of Mg(HCO3)2//\n", "M5=100/98;//multiplication factor of H2SO4//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//L+S\n", "P3=W3*M3;//in terms of CaCO3//S\n", "P4=W4*M4;//in terms of CaCO3//2*L\n", "P5=W5*M5;//in terms of CaCO3//L+S\n", "printf ('We do not take SiO2 since it does not react with lime/soda');\n", "V=50000;//volume of water in litres//\n", "L=0.74*(P1+P2+2*P4+P5)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.2f g',L);\n", "S=1.06*(P2+P3+P5)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.2f g',S)" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.75: calculation_of_required_lime_and_soda.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.90 example 3//\n", "clc \n", "Purity_Lime=.95\n", "Purity_soda=.9\n", "W1=81;//amount of Ca(HCO3)2 in ppm//\n", "W2=73;//amount of Mg(HCO3)2 in ppm//\n", "W3=68;//amount of CaSO4 in ppm//\n", "W4=95;//amount of MgCl2 in ppm//\n", "W5=14.8;//amount of Mg(NO3)2 in ppm//\n", "W6=14.7;//amount of H2SO4 in ppm//\n", "M1=100/162;//multiplication factor of Ca(HCO3)2//\n", "M2=100/146;//multiplication factor of Mg(HCO3)2//\n", "M3=100/136;//multiplication factor of CaSO4//\n", "M4=100/95;//multiplication factor of MgCl2//\n", "M5=100/148;//multiplication factor of Mg(NO3)2//\n", "M6=100/98;//multiplication factor of H2SO4//\n", "P1=W1*M1;//in terms of CaCO3//L\n", "P2=W2*M2;//in terms of CaCO3//2*L\n", "P3=W3*M3;//in terms of CaCO3//S\n", "P4=W4*M4;//in terms of CaCO3//L+S\n", "P5=W5*M5;//in terms of CaCO3//L+S\n", "P6=W6*M6;//in terms of CaCO3//L+S\n", "V=1000000;//volume of water in litres//\n", "L=0.74*(P1+2*P2+P4+P5+P6)*V/Purity_Lime;//lime required in mg//\n", "L=L/10^3;\n", "printf('\n Amount of Lime required is %.1f g',L);\n", "S=1.06*(P3+P4+P5+P6)*V/Purity_soda;//soda required in mg//\n", "S=S/10^3;\n", "printf('\n Amount of Soda required is %.1f g',S);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.76: Hardwater_quantity_softened_using_Zeolite_process.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.90 example 4//\n", "clc\n", "Hardness=480//Hardness of water(mg/lit) or ppm//\n", "H=Hardness/100//Hardness of water(gms/lit)//\n", "volume_NaCl=300//Volume of NaCl//\n", "conc_NaCl=150//% NaCl consumed by zeolite bed//\n", "Wt_per_Litre=conc_NaCl*10//gms NaCl consumed by zeolite bed per litre//\n", "total_wt=Wt_per_Litre*volume_NaCl//total gms NaCl consumed by zeolite bed//\n", "CaCO3_equivalent=total_wt*50/58.5//in terms of (gms/lit)//\n", "volume_hardwater=CaCO3_equivalent/H\n", "printf('\nQuantity of water softened using zeolite bed is %.f litres',volume_hardwater);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.7: hardness_calculation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.11 example 7//\n", "clc\n", "W1=7.3;//Mg(HCO3)2 in water in mg/L//\n", "W2=9.5;//MgCl2 in water in mg/L//\n", "W3=16.2;//Ca(HCO3)2 in water in mg/L//\n", "W4=13.6;//CaSO4 in water in mg/L//\n", "M1=100/146;//multiplication factor of Mg(HCO3)2//\n", "M2=100/95;//multiplication factor of MgCl2//\n", "M3=100/162;//multiplication factor of Ca(HCO3)2//\n", "M4=100/136;//multiplication factor of CaSO4//\n", "P1=W1*M1;//Mg(HCO3)2 in terms of CaCO3//\n", "P2=W2*M2;//MgCl2 in terms of CaCO3//\n", "P3=W3*M3;//Ca(HCO3)2 in terms of CaCO3//\n", "P4=W4*M4;//CaSO4 in terms of CaCO3//\n", "T=P1+P3;\n", "printf('\nTemporary hardness is %.0f ppm',T);\n", "P=P2+P4;\n", "printf('\nPermanant hardness is %.0f ppm',P);\n", "To=T+P;\n", "printf('\nTotal hardness is %.0f ppm',To);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.8: hardness_calculation.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.12 example 8//\n", "clc\n", "W1=19;//MgCl2 in water in mg/L//\n", "W2=5;//CaCO3 in water in mg/L//\n", "W3=29.5;//Ca(HCO3)2 in water in mg/L//\n", "W4=13;//CaSO4 in water in mg/L//\n", "M1=100/95;//multiplication factor of MgCl2//\n", "M2=100/100;//multiplication factor of CaCO3//\n", "M3=100/162;//multiplication factor of Ca(HCO3)2//\n", "M4=100/136;//multiplication factor of CaSO4//\n", "P1=W1*M1;//MgCl2 in terms of CaCO3//\n", "P2=W2*M2;//CaCO3 in terms of CaCO3//\n", "P3=W3*M3;//Ca(HCO3)2 in terms of CaCO3//\n", "P4=W4*M4;//CaSO4 in terms of CaCO3//\n", "T=P2+P3;\n", "printf('\nTemporary hardness is %.2f ppm',T);\n", "P=P1+P4;\n", "printf('\nPermanant hardness is %.2f ppm',P);\n", "To=T+P;\n", "printf('\nTotal hardness is %.2f ppm',To);" ] } , { "cell_type": "markdown", "metadata": {}, "source": [ "## Example 1.9: hardness_calculation_by_EDTA_method.sce" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "//water//\n", "//page 1.15 example 1//\n", "clc\n", "strength=1.1//in terms of mgs/ml CaCO3//\n", "volume=50//volume titrated(ml)//\n", "EDTA=38//volume in terms of ml//\n", "volume_hardwater=100//volume of hardwater titrated(ml)//\n", "EDTA_hardwater=21//volume used to titrate unknown hardwater//\n", "CaCO3_equivalent=strength*volume//in terms of mg//\n", "one_ml_EDTA=CaCO3_equivalent/EDTA//in terms of CaCO3 equivalent//\n", "titrate_equivalent=one_ml_EDTA*EDTA_hardwater/volume_hardwater//CaCO3 equivalent of titrated volume//\n", "Hardness=titrate_equivalent*1000//in terms of mg/lit or ppm//\n", "printf('\nHardness of water is %.1f mg/L',Hardness);" ] } ], "metadata": { "kernelspec": { "display_name": "Scilab", "language": "scilab", "name": "scilab" }, "language_info": { "file_extension": ".sce", "help_links": [ { "text": "MetaKernel Magics", "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" } ], "mimetype": "text/x-octave", "name": "scilab", "version": "0.7.1" } }, "nbformat": 4, "nbformat_minor": 0 }