• No results found

A nice introduction to chemical engineering calculations is provided by Felder, R. M., and R.

Rousseau, Elementary Principles of Chemical Processes, 2nd ed. Wiley, New York (1986).

Excellent discussions of the issues involved in modeling a mixing tank, incorporating density effects and energy balances, is provided in the following two books: Denn, M. M., Process

Modeling, Longman, New York (1986); Russell, T.R. F., and M. M. Denn, Introduction to Chemical Engineering Analysis, Wiley, New York (1971).

An introduction to chemical reaction engineering is Fogler, H. S., Elements of Chemical Reaction Engineering, 3rd ed., Prentice Hall, Englewood Cliffs, NJ (1999).

An excellent textbook for an introduction to chemical engineering thermodynamics is Smith, J. M., H. C. Van Ness, and M. M. Abbott, Chemical Engineering Thermodynamics, 6th ed., McGraw-Hill, New York (2001).

A more detailed discussion of process dynamics is provided in the textbook Bequette, B.W., Process Dynamics: Modeling, Analysis and Simulation, Prentice Hall, Upper Saddle River, NJ (1998).

The reaction of ethylene oxide and water to form ethylene glycol is discussed in Fogler, H. S., Elements of Chemical Reaction Engineering, 2nd ed., Prentice Hall, Upper Saddle River, NJ (1992).

[ Team LiB ]

[ Team LiB ]

Student Exercises

1: Consider the gas drum in Example 2.1. Often the outlet flow relationship is actually nonlinear, with the form

so the modeling equation is

Discuss whether this is now a self-regulating process. Also, sketch the steady-state input (qis) -output (Ps) curve, based on the flow coefficient, b = 1 mol · s-1 · atm-1/2 and a constant header pressure, Ph = 1 atm.

2: Consider the heated mixing tank example, which had the modeling equations

For steady-state inlet and outlet flow rates of 100 liters/minute, a liquid volume of 500 liters and inlet and outlet temperatures of 20° and 40°C, respectively:

Find the steady-state heating rate, Q.

a.

Consider a step inlet temperature change from 20° to 22°C. Use Euler integration with a integration step size of 0.5 minutes to find the vessel temperature response for the first 2 minutes. Compare this with MATLAB ode45 (see the ODE module).

b.

3: Often liquid surge tanks (particularly those containing hydrocarbons) will have a gas

"blanket" of nitrogen or carbon dioxide to prevent the accumulation of explosive vapors above the liquid, as depicted below.

Develop the modeling equations with gas pressure and liquid volume as the state variables. Let qf and q represent the inlet and outlet gas molar flow rates, Ff and F the liquid volumetric flow rates, V the constant (total) volume, Vl the liquid volume, and P the gas pressure. Assume the ideal gas law. Show that the modeling equations are

and state any other assumptions.

4: Consider the ethylene glycol problem (Example 2.2). If two 800-gallon reactors are placed in series, what volumetric flow rate is necessary to produce 100 million lb/year of ethylene glycol? What percentage savings is this compared with using a single 800-gallon reactor?

5: Consider the ethylene glycol problem (Example 2.2). Solve the dynamic equations using ode45 (see the ODE module), for a step change in space velocity from 0.0778 to 0.0817 min-1. Compare your plots with those shown in Figure 2-4.

6: Semibatch reactors are operated as a cross between batch and continuous reactors. A semibatch reactor is initially charged with a volume of material, and a continous feed of reactant is started. There is, however, no outlet stream. Develop the modeling

equations for a single first-order reaction. The state variables should be volume and concentration of reactant A.

7: A stream contains a waste chemical, W, with a concentration of 1 mol/liter. To meet Environmental Protection Agency and state standards, at least 90% of the chemical must be removed by reaction. The chemical decomposes by a second-order reaction with a rate constant of 1.5 liter/(mol hr). The stream flow rate is 100 liter/hour and two available reactors (400 and 2000 liters) have been placed in series (the smaller reactor is placed before the larger one).

Write the modeling equations for the concentration of the waste chemical. Assume constant volume and constant density. Let

Cw1 = concentration in reactor 1, mol/liter a.

Cw2 = concentration in reactor 2, mol/liter F = volumetric flow rate, liter/hr

V1 = liquid volume in reactor 1, liters V2 = liquid volume in reactor 2, liters

k = second-order rate constant, liter/(mol hr)

Show that the steady-state concentrations are 0.33333 mol/liter (reactor 1) and 0.09005 mol/liter (reactor 2), so the specification is met.

(Hint: You need to solve quadratic equations to obtain the concentrations.) b.

Linearize at steady state and develop the state space model (analytical) of the form

where c.

Show that the A and B matrices are

(also, show the units associated with each coefficient).

d.

Assuming that each state is an output, show that the C and D matrices are e.

Find the eigenvalues of A using the MATLAB eig function, and find the eigenvalues by hand, by solving det (lI - A) = 0.

f.

Solve a for the nonlinear differential equations, using ode45. Compare the linear and nonlinear variables on the same plots (make certain you convert from deviation to physical variables for the linear results) for a step change in the flow rate from 100 liters/hour to 110 liters/hour. Assume the initial concentrations are the steady-state values (0.3333 and 0.09005). Compare the linear and nonlinear responses of the reactor concentrations. Is the removal specification still obtained?

g.

Would better steady-state removal of W be obtained if the order of the reaction vessels was reversed? Why or why not? (Show your calculations.)

h.

8: Consider Example 2.5, the stirred-tank heater example. Read and work through the

example. Use the following parameters and steady-state values:

Fs = 1 ft3/min rcp = 61.3 Btu/(°F · ft3) rjcpj = 61.3 Btu/(°F · ft3)

Tis = 50°F Ts = 125°F V = 10 ft3

Tjis = 200°F Tjs = 150°F Vj = 2.5 ft3

By solving the steady-state equations, verify that the following values obtained for UA (overall heat transfer coefficient * area for heat transfer) and Fjs (steady-state jacket flow rate) are correct:

a.

Find the values of the matrices in the state space model.

b.

Write a function file, heater.m (example shown below), to be used with ode45 (Module 3) to solve the two nonlinear ordinary differential equations.

c.

First, verify that the steady-state state variable values are correct by simulating the process with no change in the jacket flow rate.

d.

Now, perform simulations for small and large step changes in the jacket flow rate.

Use the MATLAB step command to solve for the linear state space model. Realize that the step results are based on deviation variables and for a unit step change in input one (jacket flow rate), and convert the linear states to physical variable form.

We now consider the important issue of scale-up: Pilot plants are small-scale (intermediate between lab-scale and full-size manufacturing-scale) chemical processes, used to understand process operating behavior before the

manufacturing process is designed. Here we discover the effect of vessel scale on the heat transfer removal capability of a vessel.

e.

Consider now a vessel that can handle 10 times the throughput of the previous vessel (that is, 10 ft3/min rather than 1 ft3/min). Assume that the same residence time is maintained (V/F = 10 minutes), so the volume of the new vessel is 100 ft3. Assume that the heat transfer coefficient (U) remains constant, but that the heat transfer area changes. Assume that the vessel can be modeled as a cylinder, with the height (L) = 2*diameter (D). Find the value of UA for the larger vessel.

f.

For the larger vessel, find the new steady-state value of jacket temperature that must be used to maintain the vessel temperature at T = 125°F. Also, find the new steady-state jacket flow rate. Hint: Solve the two modeling equations at steady state to obtain these values. Discuss the effect of process scale-up on the operating conditions. How large can the vessel become before the jacket temperature is too high (it approaches the inlet jacket temperature)?

g.

For the larger vessel, find the new state space model, assuming that the jacket volume is 0.25 times the vessel volume. Calculate the eigenvalues of the A matrix.

How do they compare with the smaller vessel?

h.

Find the step response for the nonlinear and linear (state space) systems for a step increase of 0.1 ft3/min in jacket flow rate. How do these compare with the smaller vessel?

i.

j.

i.

Find the step response for the nonlinear and linear (state space) systems for a step increase of 10% in the jacket flow rate. How do these compare with the smaller vessel?

j.

Example m-file to be used by ode45

function xdot = heater(t,x,flag,delFj);

%

% Dynamics of a stirred tank heater

% (c) 1994 - B.W. Bequette

% 8 July 94

% 23 Jan 01 - revised for jacket step change in argument list

%

% x(1) = T = temperature in tank

% x(2) = Tj = temperature in jacket

% delFj = change in jacket flowrate

% F = Tank flowrate

% Tin = Tank inlet temperature

% Tji = Jacket inlet temperature

% V = Tank volume

% Vj = Jacket volume

% rhocp = density*heat capacity

% rhocpj = density*heat capacity,jacket fluid

%

% parameter and steady-state variable values are:

%

% step change in jacket flow

%

To make the runs go faster, you may wish to generate and run the following script file:

%

% runs stirred tank heater example - 23 Jan 01

% step changes to stirred tank heater

%

% make certain you enter the step change value (delFj)

% before running this file

% also, generate function file with the following first line:

% function xdot = heater(t,x,flag,delFj);

% state space model with unit step change a = [-0.4 0.3;1.2 -1.8];

title('linear state space, unit step, deviation') xlabel('time, min')

% plot in physical variable form figure(3)

subplot(2,1,1),plot(tlin,125+ylinscale(:,1)) title('linear state space, physical magnitude') xlabel('time, min')

subplot(2,1,2),plot(tlin,150+ylinscale(:,2)) xlabel('time, min')

% compare linear and nonlinear on same plot figure(4)

subplot(2,1,1),plot(t,x(:,1),tlin,125+ylinscale(:,1),'--')

title('nonlinear vs. linear') xlabel('time, min')

ylabel('temp, deg F')

legend('nonlinear','linear')

subplot(2,1,2),plot(t,x(:,2),tlin,150+ylinscale(:,2),'--') xlabel('time, min')

ylabel('jacket temp, deg F') legend('nonlinear','linear')

[ Team LiB ]

[ Team LiB ]

Appendix 2.1: Solving Algebraic Equations

Fortunately, the MATLAB fsolve function is easy to use for solving algebraic equations. For a simplified presentation, we use the form

Equation A.1

obtained from Equation (2.66) with a fixed p and u. The most commonly used numerical

techniques are related to Newton-Raphson iteration. The "guess" for iteration k + 1 is determined from the value at iteration k, using

Equation A.2

where f[x(k)] is the vector of function evaluations at iteration k, and J(k) is the Jacobian matrix

Equation A.3

The ij element of the Jacobian represents the partial derivative of equation i with respect to variable j. If analytical derivatives are not available, elements of the Jacobian are obtained by perturbation of the state variable, requiring n + 1 function evaluations for an n-equation system of equations. Various quasi-Newton techniques provide approximations to the Jacobian and do not require as many function evaluations, reducing computational time.

In practice, the Jacobian matrix in Equation (A.2) is not inverted. Rather, a set of linear algebraic equations is solved for x(k+1),

Equation A.4

In this text we do not focus on the solution of algebraic equations. See the text by Bequette (1998) for more details on these techniques.

[ Team LiB ]

[ Team LiB ]

Appendix 2.2: Integrating Ordinary Differential Equations

The Euler integration method often requires very small integration step sizes to obtain a desired level of accuracy. Note that x is a vector of n state variables at each time step. For example, if there are two states (two differential equations)

we have left the inputs and parameters out of the function variable list for convenience. An example is shown next.

Related documents