You are on page 1of 12

Process Modelling, Simulation and Control for Chemical

Engineering. Solved problems. Chapter 4: Numerical


Methods.
This document contains my own solutions to the problems proposed at the
end of each chapter of the book Process Modelling, Simulation and Control
for Chemical Engineers Second Edition, by William L. Luyben. At such, I
cant guarantee that the proposed solutions are free from errors. Think about
them as a starting point for developing or as a means of checking your own
solutions. Any comments or corrections will be appreciated. Contact me at
francisco.angel.rod@gmail.com
The computer programs developed for this chapter (Matlab) are available at
https://www.dropbox.com/sh/38yoxzta1h0wwda/AAC0B0sx15wOj9QkvsM2WAVxa?dl=0

Problem 1
Write a subroutine for bubble point calculation that uses false position conver-
gence.
Solution
The example used will be the same presented earlier in the textbook, that
is,find the bubble point temperature for a mixture of 50% benzene and 50%
toluene under a pressure of 760 mmHg. Also the following values of vapor
pressures are known:

Component 100 C 125 C


Benzene 1360 2600
Toluene 550 1140

Assume that the vapor pressure dependence on temperature for every com-
ponent can be modeled using the following equation:
 
Aj
Pjs = exp + Bj
T
The false position algorithm is carried out in two stages. A first stage,
which is similar to the interval halving algorithm, during which the temperature
estimate is updated by a fixed amount until it crosses the correct value, and
a second stage, during which the temperature estimate is updated using the
recursive algorithm:

(Tn Tn1 )
Tn+1 = Tn f (Tn )
f (Tn ) f (Tn1 )
With T0 and T1 beign the first pair of values that are at opposite sides of
the correct value.
A computer program was developed to determine the bubble point temper-
ature, the number of iterations required for different starting points and initial
step sizes are shown in Figure 1.

1
Figure 1: Results for different starting points and initial step sizes.

For the examples analyzed, it is observed that for a given initial step size,
the convergence time is smaller for the initial temperature guess that is closer
to the correct value. Also for a given temperature guess, the convergence time
is smaller for the initial temperature step that is smaller. So, although a greater
initial step size crosses the correct solution in fewer steps (in other words the
second part of the algorithm can be started earlier), the greater deviation from
the correct value that is produced, results in an overall greater convergence time.
Code(s) used: P1 false position.m

Problem 2
Compare convergence times, using internal halving, Newton-Raphson, and false
position, for an ideal, four-component, vapor liquid equilibrium system. The
pure component vapor pressures are (Pjs (psia)):

2
Component 150 F 200 F
1 25 200
2 14.7 60
3 4 14.7
4 0.5 5

Calculate the correct temperature and vapor compositions for a liquid at 75


psia with a composition x1 = 0.1, x2 = 0.54, x3 = 0.30, and x4 = 0.06.
Solution
The results for interval halving algorithm are shown in Figure 2, for Newton-
Raphson in Figure 3, and for false position in Figure 4.
For the examples analyzed, it is observed that for every algorithm, the con-
vergence time is smaller for the initial temperature guess that is closer to the
correct value. The Newthon-Raphson algorithm converges faster than both in-
terval halving and false position algorithms. For false position algorithm, as
discussed in Problem 1, the convergence is faster for smaller initial step sizes,
the opposite is observed for the interval halving algorithm, this characteristics
results in smaller convergence times for the false position algorithm (compared
to interval halving) at smaller initial step sizes, whereas the opposite is true at
greater initial step sizes.

Figure 2: Results for interval halving algorithm.

Code(s) used: P2 false position.m P2 interval halving.m P2 newton raphson.m

3
Figure 3: Results for Newton-Raphson algorithm.

Problem 3
The design of ejectors requires trial and error to find the motive pressure Pm
that, with a fixed motive flow rate of gas Wm , will suck a design flow rate Ws of
suction gas from a suction pressure Ps and discharge against a higher pressure
Pd .
The motive gas is at 300 F and has a molecular weight of 60. Its flow rate
is 5000 lbm /h. The suction gas is at 400 F and 150 psia and has a molecular
weight of 50. A suction flow of 7000 lbm /h must be ejected into a discharge
pressure of 160 psia.
Assume perfect gases and frictionless, reversible, adiabatic operation of the
jet; i.e., the expansions and contractions into and out of the throat are isentropic.
The ratio of Cp to Cv for all gasses is 1.2 and Cp heat capacities are constant
and equal to 0.6 BT U/lbm R.
Find the motive pressure Pm required and the areas in the throat on the
motive suction sides, Am and As .
Solution
A sketch of the ejector is shown in Figure 5.
The system of equations that describe the ejector are: three mass fluxes
(considering As = Ad ):

7000 = As s vs (1)
5000 = Am m vm (2)
12000 = As d vd (3)

Ideal gas expressions for calculating the density:

P m Mm
m = (4)
RTm
P d Md
d = (5)
RTd

4
Figure 4: Results for false position algorithm.

Isoentropic compression expressions for calculating intermediate tempera-


tures for use at the energy balance:

  1
Pd
Ts = Ts (6)
Ps
  1
Pd
Tm = Tm (7)
Pm
An energy balance:


12000Td = 5000Tm + 7000Ts (8)

and finally a momentum balance:

As Ps + 7000vs + Am Pm + 5000vm = As Pd + 12000vd (9)

This leaves us with 11 unknowns (As , vs , Am , m , vm , d , vd , Pm , Td ,


Ts , Tm

) and 9 equations. A design procedure as the one suggested in Perrys
Chemical Engineers Handbook relies on determining an optimum discharge over

5
Figure 5: Ejector.

motive area ratio (Ad /Am ) and suction flow over motive flow ratio (ws /wm ),
given a discharge over suction pressure ratio (Pd /Ps ) and suction over motive
pressure ratio (Ps /Pm ) utilizing a design curve (Figure 6). Here two additional
relations will be used to complete the system of equations:

Ps
= 0.25 (10)
Pm
As
= 100 (11)
Am

Figure 6: Design curves for optimum single-stage ejectors.

The system of equations is solved utilizing the succesive substitution method,


first the variables that can be solved directly:
Pm from (10).
Ts from (6).

6

Tm from (7).
m from (4).
Td from (8).
d from (5).

second, an iterative procedure is carried out:

Guess As .
Calculate vs from (1).

Calculate Am from (11).


Calculate vm from (2).
Calculate vd from (3).
Calculate As from (9) (Ascalc ).

Reguess As : As = As + (Ascalc As ).

The results of the iteration results are shown in Figure 7 (The starting value
for As and where found by trial and error to assure convergence). The iteration
procedure stops when Ascalc and As differ by less than 1%.
The final results are shown in Figure 8.
Code(s) used: P3 ejector design.m

Problem 4
Find the optimum liquid concentration of the propane-isobutane mixture in an
autorefrigerated alkylation reactor. The exothermic heat QR (106 BT U/h) of
the alkylation reaction is removed by vaporization of the liquid in the reactor.
The vapor is compressed, condensed and flashed back in the reactor through a
pressure letdown valve. The reactor must operate at 50 F and the compressed
vapors must be condensed at 110 F .
Find the liquid mole fraction x of propane that minimizes the compressor
horsepower requirements for a given QR . Assume the compressor adiabatic
efficiency is 100 percent.
Solution
The compressor power requirements are given by:
"  1 #
RTin Pout
wcomp = F 1
1 Pin

Where F is the molar flow through the compressor (calculated dividing the
reaction heat by the heat of vaporization of the mixture), and will be assumed

7
Figure 7: Iteration results (Problem 3).

equal to 1.2. The pressure at the inlet is given by the liquid composition and
temperature inside the reactor.

Pin = PCs 3 xC3 + PiC


s
4
xiC4
The outlet pressure corresponds to the bubble point pressure at the temper-
ature of the condenser (because we expect a that temperature a total conden-
sation to occur).

Pout = PCs 3 yC3 + PiC


s
4
yiC4
Where yj correspond to the gas composition at the reactor (equal to the
liquid composition at the condenser). Data for vapor pressure dependency on
temperature as according to (T[K], P[Pa]) 1 :
B
ln(P ) = A + + Cln(T ) + DT E
T
is given:
1 Perrys Chemical Engineers Handbook. 8th Edition.

8
Figure 8: Final results (Problem 3).

Component A B C D E
Propane 59.078 -3492.6 -6.0669 1.0919 105 2
Butane 66.343 -4363.2 -7.046 9.4509 106 2

Data for entalphy of vaporization dependency on temperature according to


(T[K],Hv [J/Kmol]):
2
Hv = C1 (1 Tr )C2 +C3 Tr +C4 Tr
with Tr = T /Tc , is given:

Component C1 C2 C3 C4 Tc
Propane 2.9209 107 0.78237 -0.77319 0.39246 369.83
Butane 3.6238 107 0.8337 -0.82274 0.39613 425.12

The different quantities involved in the calculation, and the power require-
ment are plotted against the liquid composition of propane in the reactor ( a
base of Q=1055 J/h was used):
It can be observed that the minimum work requirement corresponds to x1 =
0, meaning that the reactor is filled only with butane. Although the pressure
ratio is greater using only butane, as compared to using only propane, the
greater molar flow due to the smaller heat of vaporization of propane increases
the work done by the compressor.
Code(s) used: P4 optimization.m

9
Figure 9: Inlet pressure at compressor.

Figure 10: Vapor mole fraction of propane at reactor.

10
Figure 11: Outlet pressure at compressor.

Figure 12: Flow through the compressor.

11
Figure 13: Power consumption at compressor.

12

You might also like