In [16]:

```
c=.498; #solute content afetr crystallisation
W1=111.; #molecular weight of CaCl2
W2=219.; #molecular weight of CaCl2.6H2O
# Calculation
M1=(108./W2)*100; #water present in 100kg of CaCl2.6H2O
M2=(W1/W2)*100; #CaCl2 present in 100kg of CaCl2.6H20
#t=M2+c*x; #total weight entering the solubility
#x+49.3; total water solubility used
#s*(x+49.3)/100 #total Cacl2 after solubility
#x=poly([0],'x'); #calc. x the weight of crystal
t= 32.112871 #roots((M2+c*x)-(x+49.3)*.819);
# Result
print "\nthe weight of water in the quantity of solution needed :%f kg"%t
h=(c)*t; #weight of CaCl2 corresponding to weight water
tw=t+h; # total weight of the solution
print "\nthe total weight of the solution is :%f kg"%tw
#end
```

In [17]:

```
#part(i)
w1=1000.; #weight of solution to be cooled
s1=104.1; #solubility at 50 degree per 100 kg of water
s2=78.0; #solubility at 10 degree per 100 kg of water
a2=45.; #percentage of sodium nitrate in the solution per 100kg of solution
# Calculation
x1=s1/(100+s1)*100; #percentage of saturated solution at 50 degree
tw=(a2/(100-a2))/(x1/(100-x1)); #the percentage saturation
print "\nthe percentage saturation is :%f percent"%(tw*100)
#part(ii)
#let x be the weight of NaNO3 crystal formed after crystallisation
#x=poly([0],'x'); #calc. x the weight of crystal
t=21.000000 #roots((w1*a2/100)-(x+(w1-x)*s2/(100+s2)));
# Result
print "\n the weight of NaNO3 crystal formed after crystallisation :%f kg"%t
#part(iii)
y=t/(a2*w1/100); #yield = weight of NaNO3 crystal formed/weight of NaNO3
print "\n the percentage yield is:%f percent"%(y*100)
#end
```

In [18]:

```
s1=19.75; #solubility at 70 degree per 100 gm of water
s2=16.5; #solubility at 50 degree per 100 gm of water
s3=12.97; #solubility at 30 degree per 100 gm of water
s4=9.22; #solubility at 10 degree per 100 gm of water
s5=7.34; #solubility at 0 degree per 100 gm of water
# Calculation
#basis is 1000kg of saturated solution
w1=1000.*(s1/(s1+100)); #weight of K2SO4 in the original solution
w2=1000.-w1; #weight of water in kg
w3=w1*.5; #weight of K2SO4 in the solution
wp=w3/(w3+w2); #weight percent of K2SO4 in the solution after crystallistion
# Result
print "\n for the corresponding temperature to :%f percent of K2SO4 is 15 degree (by linear interpolation between 10 to 30 degree) "%(wp*100)
#end
```

In [19]:

```
#part(i)
a1=146.; #solubility at 70 degree
a2=121.; #solubility at 10 degree
t1=58.; # percentage of solute content
t2=40.66;
# Calculation and Result
x1=a1/(100+a1) *100; #percentage of saturated solution at 50 degree
tw=(t1/42.)/(x1/t2); #the percentage saturation
print "\nthe percentage saturation is :%f percent"%(tw*100)
#part(ii)
p1=2000*.58; #weight of solute in 200kg of solution 2000*.58
#let x be the weight of crystal formed after crystallisation
#x=poly([0],'x'); #calc. x the weight of crystal
t=231.743929 #roots((1160)-(x+(1055.02-.547*x)));
print "\n the weight of NaNO3 crystal formed after crystallisation :%f kg"%t
#part(iii)
y=t/p1; #yield = weight of NaNO3 crystal formed/weight of NaNO3
print "\n the percentage yield is:%f percent"%(y*100)
#end
```

In [20]:

```
p1=.3; #percentage of the solute in the solution
w1=1000.; #weight of the solution taken
w2=142.; #molecular weight of Na2SO4.
# Calculation
M1=(w2/(180+w2)); #solute (Na2SO4) present in the Na2CO3.10H2O solution
s1=40.8; #solubility of Na2SO4 at 30 degree per 100 gm of water
s2=9.0; #solubility of Na2SO4 at 10 degree per 100 gm of water
#percent weight of solute in Na2SO4.10H2O= 144/322
#let x be the weight of crystal formed
#x=poly([0],'x'); #calc. x the weight of crystal
t= 576.477290 #roots((w1*40.8/140.8)-(.442*x+(w1-x)*(s2/(100+s2))));
# Result
print "\n the weight of crystal formed after crystallisation :%f kg"%t
#end
```

In [21]:

```
s1=12.5; #solubility of Na2CO3 at 10 degree per 100 gm of water
p1=.3; #percentage of the solute in the solution
w1=2000.; #weight of the solution taken
w2=106.; #molecular weight of Na2CO3.
# Calculation
M1=(w2/(180+w2)); #solute (Na2CO3) present in the Na2CO3.10H2O solution
#let x be the quantity of Na2CO3.10H2O crystal formed
#x=poly([0],'x'); #calc. x the weight of crystal
t= 1455.688623 #roots(w1*p1-M1*x-(w1-x)*(s1/(100+s1)));
# Result
print "\n the weight of quantity of Na2CO3.10H2O :%f kg"%t
#in the book the ans is wrong, they have calculated 2000*0.3-2000*12.5/112.5 as =x(miscalculation)
p=(286./106)*w1*p1; #weight of Na2CO3.10H2O crystal present in the original solution
y=t/p; #percentage yield
print "\n percentage yield :%f percent"%(y*100)
#end
```

In [14]:

```
s1=139.8; #solubility at 80 degree per 100 gm of water
s2=110.5; #solubility at 20 degree per 100 gm of water
w2=174.2; #molecular weight of K2CO3.10H2O
# Calculation
M1=(138/w2)*100; #water present in 100kg of K2CO3.10H2O
#let x be the quantity of Na2CO3.10H2O
#x=poly([0],'x'); #calc. x the weight of crystal
t=108.634036 #roots(500*(139.8/239.8)-.7921*x-(500-x)*110.5/210.5);
# Result
print "\n the weight of quantity of K2CO3.10H2O formed :%f kg"%t
p=(174./138)*500*(139.8/239.8); #weight of crystal present in the original solution
y=t/p; #percentage yield
print "\n percentage yield :%f percent"%(y*100)
#end
```

In [22]:

```
s1=20.51; #solubility at 10 degree per 100 gm of water
w2=277.85; #molecular weight of FeSO4.7H2O
# Calculation and Result
#let x be the quantity of Na2CO3.10H2O
#x=poly([0],'x'); #calc. x the weight of crystal
t= 549.684973 #roots(900*.4-.5465*x-(900-x)*20.5/120.5);
print "\n the weight of quantity of FeSO4.7H2O formed :%f kg"%t
p=(277.85/151.85)*900*(0.4); #weight of crystal present in the original solution
y=t/p; #percentage yield
print "\n percentage yield :%f percent"%(y*100)
#end
```

In [23]:

```
#part(i)
a1=229.7; #solubility at 60 degree
a2=174.7; #solubility at 60 degree
t1=68; # percentage of sodium nitrate
t2=30.34;
# Calculation and Result
x1=a1/329.7 *100; #percentage of saturated solution at 50 degree
tw=(t1/32.)/(x1/t2); #the percentage saturation
print "\nthe percentage saturation is :%f percent"%(tw*100)
#part(ii)
#let x be the weight of Cesium chloride crystal formed after crystallisation
#x=poly([0],'x'); #calc. x the weight of crystal
t=120.960000 #roots(1000*.68-(x+(1000-x)*174.7/274.7));
print "\n the weight of CaCl2 crystal formed after crystallisation :%f kg"%t
#part(iii)
y=t/680.; #yield = weight of CaCl2 crystal formed/weight of CaCl2
print "\n the percentage yield of Cesium chloride is:%f percent"%(y*100)
#end
```

In [24]:

```
s1=38.8; #solubility at 30 degree per 100 gm of water
s2=12.5; #solubility at 10 degree per 100 gm of water
w2=296; #molecular weight of Na2CO3.10H2O
per=116./w2 *100; #percentage solute in Na2CO3.10H2O
#let x be the quantity of Na2CO3.10H2O
w=200.; #original solotion weight
# Calculation
m1=w*(s2/(s2+100)); #weight of Na2CO3.10H2O needed to dissolve Na2CO3 present in the original solotion
w3=w-m1; #weight of water
#w4=m1+per/100; weight of Na2CO3 after dissolution
x1=s1/(s1+100); #weight fraction of solute after dissolution
# Result
print "\n the weight of quantity of Na2CO3.10H2O formed :%f kg"%w3
#for the total solution after dissolution
#x=poly([0],'x'); #calc. x the weight of crystal
t= 300.485784 #roots((m1+per*x/100)-((m1+per*x/100)+(w3+.609*x))*x1);
print "\nweight of Na2CO3.10H2O needed to dissolve Na2CO3 present in the original solution %f kg"%t
#end
```

In [25]:

```
s1=35.; #percentage of solution
x1=6000.; #weight of Na2CO3 solution
s2=21.5; #solubility at 20 degree per 100 gm of water
w2=296.; #molecular weight of Na2CO3.10H2O
# Calculation
per=116./w2 *100; #percentage solute in Na2CO3.10H2O
w1=s1*x1; #weight of solute
w3=x1*0.04; #weight of solution lost by vaporisation
#let x be the quantity of Na2CO3.10H2O formed
#making material balance
#x=poly([0],'x'); #calc. x the weight of crystal
t= 5049.122335 #roots(2100-(.391*x)-(6000-240-x)*(21.5/121.5));
# Result
print "\n the weight of Na2CO3.10H2O crystal formed after crystallisation :%f kg"%t
#end
```

In [26]:

```
C=1000.; #crystal formed in kg
hf=26.002; #enthalpy of the feed at 80 degree in cal/g
hl=-1.33; #enthalpy of the saturated sol at 30 degree in cal/g
hc=-50.56; #enthalpy of crystal
xf=40./(100+40);
xm=30./(100+30);
xc=151.84/277.85; #151.84 is the weight of FeSO4
#component balance
Hf=26.002; #enthalpy of the feed at 80 degree in cal/g
Hv=612.; #
Hm=-1.33; #enthalpy of the saturated sol at 30 degree in cal/g
Hc=-50.56; #enthalpy of crystal leaving the crystalliser
from numpy import matrix
from numpy import linalg
#solving these we gt
# Calculation
a=matrix([[1,-1,-1],[.286,-.231,0],[26.002,1.33,-612]])
b=matrix([[10000],[5470],[-505600]])
x=linalg.inv(a)*b; #solving out the values using matrices
t1=x[0]; #3 solution of the eqn
t2=x[1];
t3=x[2];
# Result
print "\n the feed rate F= : %f kg/hr \n value of M= : %f kg/hr\n value of V=: %f kg/hr"%(t1,t2,t3)
#end
```

In [27]:

```
import math
C=800.; #crystal formed in kg/hr
t2=49.; #temp. of the entering fed
t1=27.; #temp. of the product
t3=21.; #temp. of the leaving cooling water
t4=15.; #temp. of the enetring cooling water
U=175.; #overall heat transfer coefficient
F=140*151.85/277.85; #feed concentration
xf=F/240; #concentration in feed solution
P=74*151.85/277.85; #product concentration
xm=P/174; #concentration of FeSO4 in product solution
xc=151.85/277.85; #
# Calculation
#solving these we get
F=800*.3141/0.0866; #feed conc.
M=F-C; #product concentration
#making energy balance
#heat to be removed by cooling water =heat to be removed from solution + heat of crystallization
cp=.7; #specific heat capacity
dt=(t2-t1); #change in temp.
dh=15.8; #heat of crystallization
Q=F*cp*dt+dh*C; #heat to be removed by cooling water
cp=1; #specific heat capacity of water
dt=(t3-t4); #change in temp.
mw=Q/(cp*dt); #cooling water needed
# Result
print "\n cooling water requiement is :%f kg/hr"%mw
#Q=U*A*(dtlm)
dtlm=((t2-t3)-(t1-t4))/(math.log((t2-t3)/(t1-t4)));#log mean temp. difference
A=Q/(U*dtlm); #area of the crystallizer section
l=A/1.3;
print "\n length of crystallliser sections needed is :%f m"%l
#end
```