print"\n For concentrations in kg sucrose/kg water:"
c = 2.45# #concentration is in kg/kg
print"\n c = %.2f kg/kg"%(c)
c1= 2.04# #concentration is in kg/kg
print"\n c1 = %.2f kg/kg"%(c1)
S = c/c1
print"\n S = %.2f"%(S)
print"\n\n For concentrations in kg sucrose/kg water:"
co = c/(c+1)# #concentration is in kg/kg solution
print"\n co = %.3f kg/kg solution"%(co)
co1 = c1/(c1 + 1)# #concentration is in kg/kg solution
print"\n co1 = %.3f kg/kg solution"%(co1)
S = co/co1
print"\n S = %.2f "%(S)
from math import exp
print"\n For barium sulphate"
def increase_barium(d):
y = exp((2*233*0.13)/(2*8314*298*4500*d))
x = y-1
return x
i=0
d = [0.5, 0.05, 0.005]
while(i<=2):
print"\n Increase in solubility for barium sulphate fpr particle size %f um = %f per cent"%(d[i]*2,(increase_barium(d[i]*10**(-6))*100))
i = i+1
print"\n For Sucrose"
def increase_sucrose(d1):
b = exp((2*342*0.01)/(1*8314*298*1590*d1))
a = b-1
return a
j=0
while(j<=2):
print"\n Increase in solubility for barium sulphate fpr particle size %f um = %f per cent"%(d[j]*2,(increase_sucrose(d[j]*10**(-6))*100))
j = j+1
from __future__ import division
R = 322/142
#The initial concentration
c1 = 1000/5000# #Concentration is in kg Na2SO4/kg water
print"\n The initial concentration c1 = %.1f kg Na2SO4/kg water"%(c1)
#The solubility
c2 = 9/100# #solubility is in Kg Na2SO4/kg water
print"\n The solubility c2 = %.2f Kg Na2SO4/kg water"%(c2)
print"\n Initial mass of water,w1 = 5000 kg and the water lost by evaporation E = %f kg/kg"%(2/100)
print"\n yield y = %d kg Na2SO4.10H2O"%((5000*2.27)*(0.2-0.09*(1-0.02))/(1-0.09*(2.27-1)))
#Given data:
#Heat of crystallisation, q = 144 kJ/kg trihydrate
#Heat capacity of the solution, Cp = 3.5 kJ/kg deg K
#Latent heat of water at 1.33 kN/m2, λ = 2.46 MJ/kg
#Boiling point of water at 1.33 kN/m2 = 290.7 K
#Solubility of sodium acetate at 290.7 K, c2 = 0.539 kg/kg water
#Equilibrium liquor temperature
T = 290.7+11.5
print"\n Equilibrium liquor temperature is%.1f K"%(T)
#Initial concentration
c1 = 40/(100-40)
print"\n Initial concentration c1 = % .3f kg/kg water"%(c1)
#Final concentration
c2 = 0.539
print"\n Final concentration,c2 = %.3f kg/kg water"%(c2)
#Ratio of molecular masses
print"\n Ratio of molecular masses,R = %.2f"%(136/82)
E = (144*1.66*(0.667-0.539)+3.5*(353-302.2)*(1+0.667)*(1-0.539*(1.66-1))/(2460*(1-0.539*(1.66-1))-(144*1.66*0.539)))
print"\n\n\n E = %.3f kg/kg water originally present"%(E)
print"\n yeild y = %.3f kg/sec"%((0.56*(100-40)/100)*1.66*(0.667-0.539*(1-0.153))/(1-0.539*(1.66-1)))
from math import log
from __future__ import division
#The molecular mass of hydrate/molecular mass of anhydrate
R = 380/164
print"\n The molecular mass of hydrate/molecular mass of anhydrate,R = %.2f"%(R)
#It will be assumed that the evaporation is negligible and that E = 0.
c1 = 0.23
print"\n The initial concentration, c1 = %.2f kg/kg solution or %.2f kg/kg water"%(c1,c1/(1-c1))
c2 = 15.5
print"\n The final concentration, c2 = %.1f kg/kg water or 0.155 kg/kg water"%(c2)
w1 = 0.77
print"\n In 1 kg of the initial feed solution, there is 0.23 kg salt and 0.77 kg water and hence w1 = %.2f kg"%(w1)
y = 2.32*0.77*(0.30-0.155*(1-0))/(1-0.155*(2.32-1))
print"\n yeild y = %.2f kg"%(y)
print"\n In order to produce 0.063 kg/s of crystals, the required feed is: %.3f kg/sec"%(1*0.063/0.33)
q = 0.193*3.2*(313-298)
print"\n The heat required to cool the solution %.1f kW"%(q)
q1 = 0.063*146.5
print"\n Heat of crystallisation = %.1f kW"%(q1)
print"\n total heat loss = %.1f kW"%(q+q1)
print"\n Assuming counter current flow"
deltaT1 = (313-293)
print"\n deltaT1 = %d deg K"%(deltaT1)
deltaT2 = 298 - 288
print"\n deltaT2 = %d deg K"%(deltaT2)
deltaTlm = (deltaT1-deltaT2)/log(deltaT1/deltaT2)
print"\n The logarithmic mean temperature is %.1f deg K"%(deltaTlm)
A = (q+q1)/(0.14*14.4)
print"\n The heat transfer area required, A= Q/UdeltaTm = %.1f m**2"%(A)
print"\n Length of heat exchanger required = %.1f"%(A)
print"\n\n\n\n In practice 3 lengths, each of 3 m length would be specified."
from sympy import symbols,solve
from math import exp,log
down_time = (4/0.00017)
print"\n Draw down time = %d secs"%(down_time)
print"\n\n\n (a)"
print"\n from a mass balance the total mass of solids is :"
cs = (6*0.6*2660*10**13)*(10**(-8)*23530)**4
print"\n cs = %d kg/m**3"%(cs)
print"\n\n\n (b)"
print"\n The production rate = %.3f kg/sec"%(cs*0.00017)
print"\n The crystal population decreases exponentially with size "
x = exp((-100*10**(-6))/(10**(-8)*23530))
print"%d percent"%(x*100)
print"\n Thus 34 percent have been discharged by the time they reach 100 um"
print"\n\n\n (c)"
#If (100 − 90) = 10 per cent of the nuclei remain and grow to >100 μm, then
t = symbols('t')
t1 = solve(t - 10**(4)/log(1/0.10))[0]
print"\n tr = %d secs"%(t1)
Q = symbols('Q')
Q1 = solve(Q + (4/4343-0.00017))[0]
print"\n Qf = %f m**3/sec"%(-Q1)
from sympy import symbols,solve
from math import exp,log
l = symbols('l')
l1 = solve(log(780/220)-(l*(463-433))/(8314*463*433))[0]
print"\n λv = %d kj/kmol"%(l1)
P = symbols('P')
P1 = solve(P-220/exp(70340*(433-393)/(8.314*433*393)))[0]
print"\n P = %d kN/m**2"%(P1)#
print"\n Vaporisation stage :"
Pt = 101.5
Ps = 1.44
Sv = 0.56*(138/29)*(1.44/(101.5-1.44))
print"\n Sv = %.3f kg/sec"%(Sv)
print"\n\n COndensation stage: "
Ptc = 100
Psc = 0.0023
S = 0.56*(138/29)*(0.0023/(100-0.0023))
print"\n S = %f kg/sec"%(S)