In [1]:

```
# variables
PC1 = 85. #% ( Percent carbon in coal )
PA1 = 15. #% ( Percent ash in coal )
PA2 = 80. #% ( Percent ash in cinder )
PC2 = 20. #% ( Percent carbon in cinder )
m = 100. #kg (weight of coal )
# Calculation
mash = PA1 * m / 100
w = mash * 100 / PA2 # weight of cinder
mcarbon = w - mash
Plost = mcarbon * 100 / ( m - mash )
# Result
print "weight of cinder formed = ",w,"kg"
print "Percent fuel lost = %.2f"%Plost,"%"
```

In [3]:

```
# variables
m = 1. #kg ( mass of completely dry wood )
P1 = 40. #% ( percentage moisture in wet wood )
P2 = 5. #% ( Percentage moisture in dry wood )
# Calculation
mwaterin = P1 * m / ( 100 - P1 )
mwaterout = P2 * m / ( 100 - P2 )
mevaporated = mwaterin - mwaterout
# Result
print "mass of water evaporated per kg of dry wood = %.3f"%mevaporated,"kg"
```

In [5]:

```
# variables
F1 = 6*1000. #L/s
BOD1 = 3 * 10.**-5 #g/L
BOD2 = 5 * 10.**-3 #g/L
# Calculation
V = 16 * 10.**3 #m**3/day
v = V * 10**3 / (24 * 3600.) #L/s
#Let BOD of the effluent be BODeff,
BODeff = (BOD2 * (F1 + v) - BOD1 * F1) / ( v )
# Result
print "BOD of the effluent of the plant = %.4f"%BODeff,"g/L"
```

In [7]:

```
# variables
D = 100. #kg of overhead product
xfa = 0.956
xdw = 0.074
xdb = 0.741
xda = 0.185
# Calculation
#water balance gives
F = D * xdw / (1 - xfa)
W = F * xfa - xda * D
W1 = 100
B = xdb*D
Bused = B * W1 / W
# Result
print "Quantity of benzene required = %.2f"%Bused,"kg"
```

In [9]:

```
# variables
#let, W - waste acid, S - Sulfuric acid, N - nitric acid, M - mixed acid
xsh2so4 = 0.95
xsh2o = 0.5
xwh2so4 = 0.3
xwhno3 = 0.36
xwh2o = 0.34
xmh2so4 = 0.4
xmhno3 = 0.45
xmh2o = 0.15
xnhno3 = 0.8
xnh2o = 0.2
M = 1000. #kg
# Calculation
# total material balance, W + S + N = 1000
#H2SO4 balance, xwh2so4 * W + xsh2so4 * S = xmh2so4*M
#HNO3 balance, xwhno3 * W + xnhno3 * N = xmhno3*M
#H2O balance, xwh2o*W+xnh2o*N + xsh2o*S = xmh2o*M
#solving the above equations simultaneously, we get,
W = 70.22 #kg
S = 398.88 #kg
N = 530.9 #kg
# Result
print "Waste acid = ",W,"kg"
print "Concentrated H2SO4 = ",S,"kg"
print "Concentrated HNO3 = ",N,"kg"
```

In [11]:

```
# variables
F = 1000. #kg
Psolute1 = 20. #%
Psolute2 = 80. #%
# Calculation
#taking solute balance
L3 = F * Psolute1 / Psolute2
#taking total material balance
V = (F -L3) / 3
#for first effect, total balance gives,
L1 = F - V
#solute balance gives,
Psolute3 = F * Psolute1 / L1
#For second effect, total balance gives,
L2 = L1 - V
#solute balnce gives,
Psolute4 = L1 * Psolute3 / L2
# Result
print "solute entering second effect = %.2f"%Psolute3,"%"
print "Weight entering second effect",L1,"kg"
print "solute entering third effect = ",Psolute4,"%"
print "Weight entering third effect",L2,"kg"
```

In [12]:

```
# variables
F = 100. #kg
xf = 0.25
x2 = 7/107.
P1 = 10 #%
# Calculation
W3 = P1 * F * (1-xf)/100. #(W3 - weight of water evaporated)
# let W1 and W2 be weight of crystal and weight of mother liquor remaining after crystallization resp_,
#F = W1 + W2 + W3
#100 = W1 + W2 + 7.5
#solute balance gives, F*xf = W1*x1 + W2*x2
#100*0.25 = W1*1+W2 * 0.0654
W2 = (F - W3 - F*xf)/(1-x2)
W1 = F - W3 - W2
# Result
print "yeild of the crystals = %.2f"%W1,"kg"
```

In [14]:

```
# variables
F = 100. #kg
xf = 0.15
P1 = 80. #% ( Carbonate recovered )
M1 = 106. #(Molecular weight of Na2CO3)
M2 = 286. #(Molecular weight of Na2CO3.10H2O)
# Calculation
x1 = M1 / M2 #(Weight fraction of Na2CO3 in crystals)
Mrecovered = P1 * F * xf / 100
Wcrystal = Mrecovered / x1
# Result
print "(a)quantity of crystals formed = %.2f"%Wcrystal,"kg"
#Na2CO3 balance gives, F*xf = Wcrystal*x1 + W2*x2
#W2 weight of mother liquor remaining after crystallization
#let M = W2 * x2,therefore
M = F * xf - Mrecovered
x2 = 0.09
W2 = M/x2
W3 = F - Wcrystal - W2 #weight of water evaporated
print "(b)Weight of water evaporated = %.2f"%W3,"kg"
# note : answer may vary because of rounding error
```

In [15]:

```
# variables
m = 100. #kg (of 60% solution)
#w - water added to the original solution
#w1 - wt. of Na2S2O3.5H2O crystallized
#w2 - wt. of mother liquor obtained
#w3 - solution carried away by the crystals
xf = 0.6
Mna2s2o3 = 158
Mna2s2o35h2o = 248
# Calculation
mcrystals = m * xf * Mna2s2o35h2o / Mna2s2o3
# free water available = m + w - 1 - mcrystals
#concentration of impurity = 1/(w+4.823)
#total balance, 100 - 1 + w = w1 + w2 + w3
#w1 + w2 + w3 - w = 99
#Na2S2O3 balance, 60 = (w1 + w2 * 1.5/2.5 + w3 * 1.5/2.5)*158/248
#w1 + 0.6 * w2 + 0.6 * w3 = 94.177
#each gram crystals carry 0.05 kg solution,
#w3 = 0.05 * w1
#impurity % = 0.1
#impurity = w3 /(2.5 * (w+4.823))
#solving above equations, we get
w = 14.577 #kg
w1 = 65.08 #kg
w2 = 45.25 #kg
w3 = 0.05 * w1
# Result
print "(a)amount of water added = %.2f"%w,"kg"
print "(b)amount of Na2S2O3.5H2O crystals added = ",w1,"kg"
m1 = w1 * Mna2s2o3 / Mna2s2o35h2o + w3 * 1.5 * Mna2s2o3 / (2.5 * Mna2s2o35h2o)
P = m1*100/(m*xf)
print "(c)Percentage recovery of Na2S2O3 = %.1f"%P,"%"
```

In [16]:

```
# variables
m = 100. #kg
Pin1 = 40. #% ( tannin )
Pin2 = 5. #% ( moisture )
Pin3 = 23. #% ( soluble non tannin material )
# Calculation
Pin4 = 100 - Pin1 - Pin2 - Pin3 #% ( insoluble lignin )
# since, lignin is insoluble, all of it will be present in the residue
Pout1 = 3. #%
Pout2 = 50. #%
Pout3 = 1. #%
Pout4 = 100 - Pout1 - Pout2 - Pout3
#let W be the mass of residue, then we get
W = Pin4 * m / Pout4
Ptannin = W * Pout1 * 100 / (m * Pin1)
# Result
print "Percent of original tannin unextracted = %.1f"%Ptannin,"%"
```

In [17]:

```
# variables
F = 100. #kg
#F - feed, R - overflow, U - underflow, S - solvent
#F + S = U + R ( Total balance )
Poil1 = 49. #% ( 1 - feed )
Ppulp1 = 40. #%
Psalts1 = 3. #%
# Calculation
Pwater = 100 - Poil1 - Ppulp1 - Psalts1
Phexane2 = 25. #%(2 - underflow)
Psalts2 = 2.5 #%
Poil2 = 15. #%
Pwater2 = 7.5 #%
Ppulp2 = 100 - Phexane2 - Poil2 - Pwater2 - Psalts2
Poil3 = 25. #% ( 3 - extract )
#taking pulp ( inert ) balance
U = Ppulp1 * F / Ppulp2
#oil balance gives, F * Poil1 = U * Poil2 + R * Poil3,from these , we get
R = (F * Poil1 - U * Poil2)/Poil3
S = U + R - F
# Result
print "(a)The amount of solvent used for extraction = ",S,"kg"
Precovered = 95. #%
mhexane2 = Phexane2 * U / 100
mrecovered = mhexane2 * Precovered / 100
P = mrecovered * 100 / S
print "(b)Percent of hexane used that is recovered from the underflow = %.2f"%P,"%"
Poil = Poil3 * R * 100 / (F * Poil1 )
print "(c)Percent recovery of oil = %.2f"%Poil,"%"
```

In [19]:

```
#F = feed(wet solid), V1 = water evaporated(drier),
#V2 = water evaporated(oven), S1 = Dry solid(drier), S2 = Dry solid(oven)
# variables
F = 1000. #kg
xf = 0.8
x1 = 0.15
x2 = 0.02
# Calculation
#moisture free solid balance for drier, F * ( 1 - xf) = S1 * ( 1 - x1 )
S1 = F * ( 1 - xf )/(1 - x1)
#total balance for drier , F = S1 + V1
V1 = F - S1
#For oven, S1 * ( 1 - x1 ) = S2 * ( 1 -x2 )
S2 = S1 * ( 1 - x1 )/(1 - x2)
#Also, S1 = S2 + V2
V2 = S1 - S2
# Result
print "(a)Weight of product leaving the drier = %.2f"%S1,"kg"
print " Weight of product leaving the oven = %.2f"%S2,"kg"
P1 = V1 *100/ (F * xf)
P2 = V2 *100/ (F * xf)
print "(b)Percentage of original water removed in drier = %.1f"%P1,"%"
print " Percentage of original water removed in oven = %.2f"%P2,"%"
```

In [20]:

```
# variables
#Ss = solid flow rate,
Pwaterin = 25. #%
Pwaterout = 5. #%
# Calculation
X1 = Pwaterin/(100 - Pwaterin) #kg water/kg dry air
X2 = Pwaterout/(100 - Pwaterout) #kg water/kg dry air
#form humidity chart,
Y2 = 0.015 #kg water/kg dry air
Y1 = 0.035 #kg water/kg dry air
m = 1. #kg of dry air
#Ss * X1 + Y2 = Ss * X2 + Y1
Ss = (Y1 - Y2) / ( X1 - X2 )
T = 87.5 + 273.15 #K
P = 101.3 #kPa
Tstp = 273.15 #K
Pstp = 101.3 #kPa
Vstp = 22.4143 #m**3/mol
V = 100. #m**3
N = V * P * Tstp / ( Vstp * Pstp * T)
Nr2 = Y2 * 29 / 18. #kmol of water / kmol of dry air
Ndryair = N * 1 / (1 + Nr2)
mdryair = Ndryair * 29
mevaporated = mdryair * ( Y1 - Y2 )
# Result
print "(a)total moisture evaporated per 100m**3 of air entering = %.3f"%mevaporated,"kg"
Ss1 = mdryair * Ss
mproduct = Ss1 * ( 1 + X2 )
print "(b)mass of finished product per 100m**3 of air entering = %.2f"%mproduct,"kg"
```

In [22]:

```
# variables
#F = feed, E = extract, S = solvent, R = Raffinate
xwaterF = 0.7 #Feed
xalcoholF = 0.3
xwaterR = 0.71 #raffinate
xalcoholR = 0.281
xethyR = 0.009
xwaterE = 0.008 #Extract
xalcoholE = 0.052
xethyE = 0.94
#Total balance, R + E = F + S
F = 100. #kg
#R + E = 100 + S (1)
#Isopropyl balance, xalcoholR * R + xalcoholE*E = xalcoholF * F
#0.281*R + 0.052 * E = 30 (2)
#Ethylene tetra chloride balance, xethyR * R + xethyE * E = S
#0.009*R + 0.94*E = S (3)
#Solving equation 1, 2 and 3 simultaneously, we get,
S = 45.1
E = 47.04
R = 98.06
# Calculation and Result
print "(a)Amount of solvent used = ",S,"kg"
print "(b)Amount of extract = ",E,"kg"
print " Amount of raffinate = ",R,"kg"
mextracted = E * xalcoholE
P1 = mextracted * 100 / (F * xalcoholF)
print "(c)Percent of isopropyl alcohol extracted = %.2f"%P1,"%"
# note : answer may vary because of rounding error.
```

In [23]:

```
# variables
G1 = 100. #kmol
#G1 and G2 be the molar flow rate of the gas at the inlet and the
# exit of the absorber resp_,y1 and y2 mole fraction at entrance and exit resp_,
y1 = 0.25 #%
y2 = 0.05 #%
# Calculation
#air balance gives, G1 * ( 1-y1 ) = G2 * ( 1-y2 )
G2 = G1 * ( 1-y1 ) / (1 - y2)
maleaving = G2 * y2
maentering = G1 * y1
Pabsorbed = (maentering - maleaving) * 100 / ( maentering)
# Result
print "Percentage of acetone absorbed = %.2f"%Pabsorbed,"%"
```

In [24]:

```
# variables
F = 5000. #kg/h
P1 = 50. #% (H2O4 in)
MH2SO4 = 98.016
P1gas = 65. #(nitrogen in gas entering)
P2gas = 35. # ( SO3)
MN2 = 28.
MSO3 = 80.
# Calculation
Mavg = ( MN2 * P1gas + MSO3 * P2gas)/100 #avg molecular wt. of entering gas
G = 4500. #kg/h
Ng = G / Mavg
NN2 = Ng * P1gas / 100
NSO3 = Ng - NN2
P2 = 75. #% (H2O4 out)
#W be the mass of 75% H2SO4, x and y be the moles of SO3 and water vapour leaving resp_,
Pwater = 25. #kPa
Ptotal = 101.3 #kPa
#Pwater / Ptotal = y / ( NN2 + x + y )
#we get, y = 0.32765 * x + 2.744 (1)
#Total balance Feed + G = W + (NN2 * 28 + x * 80 + y * 18.016)
#we get, W + 80*x + 18.016*y = 7727.32 (2)
#from 1 and 2, 84.9174*x + W = 7352.68 (3)
#SO3 balance, So3 eneterin with 50% H2SO4 + SO3 in feed gas = SO leaving with 75%H2SO4 + SO3 leaving in exit gas
#5000*0.5*80/98.016 + 34.09*80 = 80* x + 0.75*W * 80/98.016 (4)
# from 3 and 4,
x = 9.74
Nabsorbed = NSO3 - x
Pabsorbed = Nabsorbed * 100 / NSO3
# Result
print "Percentage of SO3 absorbed = %.2f"%Pabsorbed,"%"
```

In [25]:

```
# variables
F = 200. #kmol/h
#F, D and W be the flow rates of the feed, the distillate and residue
# resp_, xf , xd and xw be the mole fraction of ethanol in the fee, distillate and the residue resp_
xf = 0.10
xd = 0.89
xw = 0.003
# Calculation
#total balance gives, F = D + W
#D + W = 200 (1)
#Alcohol balance gives, F*xf = D*xd + W*xw
#0.89*D+0.003*W = 20 (2)
#solving 1 and 2
D = 21.87 #kmol/h
W = 178.13 #kmol/h
Nawasted = W*xw
mmakeup = Nawasted * 46*24
# Result
print "The make up alcohol required per day = %.2f"%mmakeup,"kg"
```

In [26]:

```
# variables
F = 100. #kg
#F, D and W be the flow rates of the feed, the distillate and bottom
# product resp_, xf , xd and xw be the mole fraction of methanol in the
# fee, distillate and the bottom product resp_
xf = 0.20
xd = 0.97
xw = 0.02
#using, F = D + W and F*xf + D*xd + W*xw,we get
D = 18.95 #kg/h
W = 81.05 #kg/h
R = 3.5
#R = L / D
#for distillate = 1kg
D1 = 1. #kg
# Calculation
L = R*D1
#Taking balance around the condenser,
G = L + D1
mcondensed = G * D / F
# Result
print "(a)Amount of distillate = ",D,"kg"
print " Amount of Bottom Product = ",W,"kg"
print "(b)Amount of vapour condensed per kg of distillate = ",G,"kg"
print "(c)Amount of vapour condensed per kg of feed = %.3f"%mcondensed,"kg"
```

In [29]:

```
# variables
mdryair = 1. #kg
Pwater1 = 1.4 #kPa ( Partial pressure at 285K )
Pwater2 = 10.6 #kPa ( Partial pressure at 320K )
P = 101.3 # ( Total )
# Calculation
Ys1 = Pwater2 * 18 / ((P - Pwater2)*29) #( saturation humidity at 320K )
Ys2 = Pwater1 * 18 / ((P - Pwater1)*29) #( saturation humidity at 285K )
Ys = 0.03 #kg water / kg dry air. (final humidity)
# humidity of air leaving dehumidifier is Ys2 and humidity of bypassed
# air is Ys1. these 2 streams combine to give humidity of 0.03kg water / kg dry air.
#therefore, taking balance we get, 1*Ys2 + x * Ys1 = (1 + x)*Ys
x = (1*Ys2 - 1*Ys)/(Ys - Ys1)
# Result
print "(a)Mass of dry air bypassed per kg of dry air sent through the dehumidifier = %.3f"%x,"kg dry air"
mcondensed = Ys1 - Ys2
mwetair = mdryair + Ys1
Nwetair = mdryair/29 + Ys1/18.016
Vstp = 22.4143 #m**3/kmol
Vstp1 = Nwetair * Vstp
T = 320. #K
P = 101.3 #kPa
Tstp = 273.15 #K
Pstp = 101.325 #kPa
V = Vstp1 * Pstp * T / (P * Tstp)
Vgiven = 100. #m**3
mcondensed1 = mcondensed * Vgiven / V
print "(b)mass of water vapour condensed in the dehumidifier per 100m**3 of air sent through it = %.4f"%mcondensed1,"kg"
mfinal = mdryair + x
mfinalair = mfinal * Vgiven / V
N = mfinalair / 29.
Ysn = Ys * 29/18. #kmol water / kmol dry air
Ntotal = N * (Ysn + 1)
Vfinal = Ntotal * Vstp * Pstp * T / ( Tstp * P )
print "(c)Volume of final air obtained per 100 cubic metres f air passed through dehumidifier = %.1f"%\
Vfinal,"m**3"
# note: answer may vary because of rounding error.
```

In [30]:

```
# variables
F = 100. #kg/h
xf = 0.2
xp = 0.93
xr = 0.5/1.5
xx = 0.65
# Calculation
#R - recycle stream, P - Product stream , W - water separeted and removed
#component A balance, F * xf = P * xp, that is,
P = F * xf / xp
#Total balance, F = P + W,therefore
W = F - P
#x be the flow rate of strea entering the filter
#total balance, x = P + R (1)
#component A balance , 0.65 * x = 0.5*R/1.5 + 0.93P (2)
#Solving 1 and 2, we get,
R = (xx * P - xp * P)/(xr - xx)
# Result
print "Flow rate of the recycle stream = %d"%R,"kg/h"
```

In [32]:

```
# variables
F = 1000. #kg/h
xfwater = 0.7
xpwater = 0.2
xrwater = 0.20
xswater = 0.5
y1 = 0.0025
y2 = 0.05
# Calculation
#R - recycle, S - stream entering granulator, P - Product, G1 - air entering the drier, G2 - air leaving the drier,
#takin overall, moisture free balance, F * xf = P * xp
P = F * ( 1 - xfwater )/(1 - xpwater )
# taking material balance at point where recycle strea joins the feed,
# F = R + S
#water balance, F*xfwater = R*xrwater + S*xswater,solving this we get,
R = (-F*xfwater +F*xswater)/(xrwater - xswater)
S = F + R
mleaving = P + R #solid leaving the drier
#dry air entering will there be in air leaving, therefore
#G1 * ( 1 - y1 ) = G2 * ( 1 - y2 )
# water balance over the drier gives, S*xswater+G1*y1=G2*y2+(P+R)*xpwater
#from above 2 equations , we get
G1 = ((mleaving*xpwater - S*xswater)/(y1 - y2*(1-y1)/(1-y2)))
# Result
print "(a)Amount of solid recycled = %.2f"%R,"kg/h"
mdryair = G1 * (1 - y1)
print "(b)circulation rate of air in the drier on dry basis = %.d"%round(mdryair,-2),"kg/h"
```

In [33]:

```
# variables
xf = 500. * 10**-6
xp = 50. * 10**-6
xb = 1600. * 10**-6
# Calculation
#F - Feed water rate, B - blow down rate, S - high pressure steam, P - process stream rate
# total balance, F = P + B
# Solid balance, F * xf + P * xp = B * xb
#eliminating P, we get, F * xf + (F - B)*xp = B * xb
#let F/B be X
X = (xb + xp)/(xf + xp)
# Result
print "the ratio of feed water to the blowdown water = ",X
```