# Variables
Ref_T = 77. ; #Reference temperature-[degree F]
#(a)
mol_NH3 = 1. ; # Moles of NH3 - [lb mol]
mw_NH3 = 17. ; #Molecular t. of NH3 -[lb]
mw_H2O = 18. ; #Molecular t. of H2O -[lb]
# Calculations and Results
f1_NH3 = 3./100 ; # Fraction of NH3 in solution
m_H2O = (mw_NH3/f1_NH3) - mw_NH3 ; # Mass of water in solution -[lb]
mol_H2O = m_H2O/mw_H2O ; # Moles of H2O in solution -[lb mol]
print '(a) Moles of H2O in solution is %.1f lb mol . '%mol_H2O
print ' As we can see that moles of water is 30 lb mol(approx), hence we will see H_soln from table corresponding to 30 lb mol water . '
H_soln = -14800. ; # From table given in question in book -[Btu/lb mol NH3]
print ' The amount of cooling needed is, %.0f Btu heat removed. '%(abs(H_soln))
#(b)
V = 100. ; # Volume of solution produced -[gal]
f2_NH3 = 32./100 ; # Fraction of NH3 in solution
sg_NH3 = .889 ; # Specific gravity of NH3
sg_H2O = 1.003 ; # Specific gravity of H2O
d_soln = sg_NH3*62.4*sg_H2O*100/7.48 ; # Density of solution - [lb / 100 gal]
NH3 = d_soln*f2_NH3/mw_NH3 ; # Mass of NH3 - [ lb mol/ 100 gal]
m1_H2O = (mw_NH3/f2_NH3) - mw_NH3 ; # Mass of water in solution -[lb]
mol1_H2O = m1_H2O/mw_H2O ; # Moles of H2O in solution -[lb mol]
print ' (b) Moles of H2O in solution is %.1f lb mol . '%mol1_H2O
print ' As we can see that moles of water is 2 lb mol , hence we will see H_soln from table corresponding to 2 lb mol water . '
H_soln = -13700 ; # From table given in question in book -[Btu/lb mol NH3]
total_H = abs(NH3*H_soln) ; # Total heat removed from solution -[Btu]
print ' The amount of cooling needed is, %.0f Btu heat removed. '%total_H
from scipy.integrate import quad
# Variables
p = 100. ; # Mass of product - [kg]
f_HCl = 25./100 ; #Fraction of HCl in product
HCl = f_HCl*p ; # Mass of HCl in product - [kg]
H2O = (1.-f_HCl)*p ; # Mass of H2O in product -[kg]
mw_HCl = 36.37 ; # Molecular weight of HCl -[kg]
mw_H2O = 18.02 ; # Molecular weight of H2O -[kg]
# Calculations
mol_HCl = HCl /mw_HCl ; # Moles of HCl - [kg mol]
mol_H2O = H2O /mw_H2O; # Moles of H2O - [kg mol]
total_mol = mol_HCl + mol_H2O ; # Total no. of moles -[kg mol]
mf_HCl = mol_HCl / total_mol ; # mole fraction of HCl
mf_H2O = mol_H2O / total_mol ; # mole fraction of H2O
mr = mol_H2O/mol_HCl ; # Mole ratio of H2O to HCl
MW = mf_HCl*mw_HCl + mf_H2O*mw_H2O ; # Molecular t. of solution-[kg]
Ref_T = 25. ; #Reference temperature-[degree C]
mol1_HCl = total_mol ; # Moles of HCl # Moles of HCl output -[g mol]
Hf1_HCl = -157753. ; # Heat of formation of HCl output-[J/ g mol HCl ]
Hf_HCl = -92311. ; # Heat of formation of HCl input-[J/ g mol HCl ]
Hf_H2O = 0 ; # Heat of formation of H2O input-[J/ g mol HCl ]
H1_HCl = 556. ; # Change in enthalpy during temperature change from 25 C to 35 C of HCl - [J/g mol]
def f(T):
return (29.13 - 0.134*.01*T)
H_HCl = quad(f,298,393)[0] # Change in enthalpy during temperature change from 25 C to 120 C of HCl - [J/g mol]
H_H2O = 0 ; # Change in enthalpy during temperature change from 25 C to 25 C of H2O - [J/g mol]
H_in = (Hf_HCl + H_HCl)*mol_HCl + (Hf_H2O + H_H2O)*mol_H2O ; # Enthalpy change of input -[J]
H_out = Hf1_HCl*mol_HCl +H1_HCl*mol1_HCl ; # Enthalpy change of output -[J]
del_H = H_out - H_in ; # Net enthalpy change n process - [J]
Q = del_H; # By energy balance - [J]
# Results
print 'The amount of heat removed from the absorber by cooling water is, %.0f J. '%Q
print 'It Seems answer is wrong in book'
# Variables
soln1 = 600. ; # Mass flow rate of entering solution 1 -[lb/hr]
c1_NaOH = 10./100 ; # Fraction of NaOH in entering solution 1
T1 = 200. ; # Temperature at entry
soln2 = 400. ; # Mass flow rate of another solution 2 entering -[lb/hr]
c2_NaOH = 50./100 ; # Fraction of NaOH in another entering solution 2
# Calculations
F = soln1 + soln2; # Mass flow rate of final solution - [lb/hr]
F_NaOH = c1_NaOH * soln1 + c2_NaOH * soln2 ; # Mass of NaOH in final solution-[lb]
F_H2O = F - F_NaOH ; # Mass of H2O in final solution-[lb]
H_soln1 = 152. ; # Specific enthalpy change for solution 1-[Btu/lb]
H_soln2 = 290. ; # Specific enthalpy change for solution 2-[Btu/lb]
H_F = (soln1*H_soln1 + soln2*H_soln2)/F ; # Specific enthalpy change for final solution -[Btu/lb]
# Results
print ' (a) The final temperature of the exit solution from figure E28.3 using the obtained condition of final solution is 232 degree F '
cF = F_NaOH*100/F; # Concentration of final solution -[wt % NaOH ]
print ' (b) The concentration of final solution is %.0f wt.%% NaOH . '%cF
x = (F*H_F - F*175)/(1158.0 - 175) ; # H2O evaporated per hour -[lb]
print ' (c) H2O evaporated per hour is %.1f lb . '%x