A Least-Squares Solution to Mass Balance around a Chemical

Apr 2, 1973 - Sauter, W. A., Ph.D. Thesis, Clarkson College of Technology, .?,"O. IYiZ. Schneider, G. R., Newton, P. R., Sheehan, D. F., U. S. Off. Sa...
15 downloads 0 Views 287KB Size
hfargolis, G., Brian, P. L. T., Sarofim, A. F., Ind. Eng. Chem., Fundam., 10, 439 (1971). Randolph, A. D., Larson, M. A., AIChE J.,8, 639 (1962). Randolph, A. D., Larson, M. A., "Theory of Particulate Processes," Academic Press, Kew York, N. Y., 1971, pp 58-61. Sadek, S. E., Sc.D. Thesis, Massachusetts Institute of Technology, 1966. Sauter, W. A., Ph.D. Thesis, Clarkson College of Technology, .?,"O

IYiZ.

Schneider, G. R., Newton, P. R., Sheehan, D. F., U . S . Off. Saline Water, Res. Develop. Prog. Rep., NO.R-7717 (1968). Schneider, G. R U.S . Off. Saline Water, Res. Develop. Prog. Rep., No. R-7i79-6 (1970).

Schneider, G. R., U . S. O j . Saline Water, Res. Develop. Prog. Rep., No. R-7979-10 (1971). Sherwood, T. K., Brian, P. L. T., Sarofim, A. F., Smith, K. A., M.I.T. Desalination Research Laboratory, Report No. 295-9 (1Qfifi) ~-~-

-,.

Shroff, H. R., M.S. Thesis, Clarkson College of Technology, 1969. Weed, D. R., M.S. Thesis, Clarkson College of Technology, 1972. Wey, J. S., M.S. Thesis, Clarkson College of Technology, 1970. Wey, J. S.,Estrin, J., AIChE Symp. Ser., 68, No. 121 (1972). Wey, J. S.,Ph.D. Thesis, Clarkson College of Technology, 1972. RECEIVED for review March 16, 1972 ACCEPTEDApril 2, 1973

A Least-Squares Solution to Mass Balance around a Chemical Reactor A. K. S. Murthy Allied Chemical Corporation, Morristown, N . J. 07960

A simple procedure to adjust the measured flow rates of the various species entering and leaving a chemical reactor so as to satisfy the element conservation equations is developed by using Lagrange multipliers and linear algebra. Since this procedure requires the solution of only 1 simultaneous linear equations, where 1 is at most the number of chemical elements in the system, it may even b e used for manual process calculations. A numerical example is given to illustrate the computational procedure.

I n experimental studies of chemical reactors at steady state, due to experimental errors, often the measured flow rates of the various species entering and leaving the reactor do not satisfy the law of conservation of elements. It is a common practice in manual process computations to attribute all the error to a few suspected measurements and adjust only these flows. When care is taken to eliminate all systematic errors, a more desirable procedure is to assume that all measurements are subject to random experimental errors and adjust the raw data in such a may that the required adjustments are minimum in some sense. This can be achieved in several ways; the methods differ in the objective function minimized and the technique used to minimize the objective function. In discussing computer control of chemical processes, Kuehn and Davidson (1961) have shown how the method of least squares can be employed to adjust raw data to satisfy material and energy balances. Vaclavek (1969) has considered the problem of material balance around a chemical reactor specifically, but his solution requires the inversion of a large matrix. Since element balances are linear constraints on the flow rates, linear programming can also be used to achieve material balance if statistical validity of the objective function is not important. The purpose of this communication is to show how a simple procedure to obtain mass balance around a chemical reactor can be developed by using the weighted least-squares procedure.

contained in a molecule of the ith species. If xi and yi are, respectively, the moles of the i t h species entering and leaving the system in unit time, then the fact that the amount of the j t h element must be conserved corresponds to N

N

etjzi = i=l

C eijvt i=l

or A'

- yi)

eij(zr i=l

=

0

j = 1,2,.. . , L

(1)

If 5 , and g i are the measured flow rates of the ith species entering and leaving the system, respectively, and ut and vi are the weights associated with the measurements, the problem is to minimize the objective function x S(z*,vd = %(Et - l d 2 Vi(!/$ - ad2 (2)

+

i=l

subject to the constraints given by eq 1. According to the method of Lagrange multipliers this is equivalent to minimizing the following unconstrained objective function

.v S * ( ~ i , y i , ~= j)

(Ui(zi

i=l

-~i)*

+

V i b i

-

+

Mathematical Formulation

Consider a chemical reactor involving hr species and L elements. Let ei3 be the number of atoms of the j t h element 246 Ind.

Eng. Chem. Process Des. Develop., Vol. 12, NO. 3, 1973

The constants z j are the Lagrange multipliers. A necessary condition for the function S* to be a miriimum

at a point is that all the first-order derivatives must be zero a t that point.

Table I Measured molar flow rates Inlet, P Outlet, jT

Species

1.60 0.00 0.70 0.28 0.02 0.01 0.00

Cl2

H C1 CH, CHsCl CHzClz CHCla

cc14

+

The above 2N L linear equations can be solved simultaneously to obtain the required values of x t and y4.But it is possible, using linear algebra, to reduce the problem to one requiring the solution of only L simultaneous equations.

0.04 1.50 0.04 0.17 0.63 0.12 0.01

No.

Y

U = {&,ut!

= ( W t ]

where, 8$, is the Kronecker delta. Then the equation to be solved is

E

i-ET V

0 !E)@

=

0

0

:)t)

0

0

I

1 C

2 H

I

0

0 0 1 1 1 1

Clz HCl CHb CHaCl CH2Cl2 CHC4

1 2 3 4 5 6 7

Let X,Y,2,f, and be vectors made of z t , yf, 21, xi,and yi, respectively. Define element matrix E and diagonal matrices U and V as follows = {ei,]

1.58064 0.00000 0.69215 0.27406 0,01598 0.00790 0 00000

0.05936 1.52128 0.04785 0.17594 0.63402 0.12210 0.01018

(a) The element matrix, E , for this system is

Method of Solution

E

Corrected flow rates Inlet, x Outlet, y

cc14

3 C1

1 4 3 2 1 0

1

(b) The discrepancy in the j t h element balance, di,is given by N

(7)

where, 0 are null matrices of compatible dimensions and the superscript T stands for transpose. Using linear algebra it is possible to show that the solution for

d, =

e d f t

$=1

- iii)

(13)

For the system under consideration, dl = 0.04, d2 = 0.14, and d3 = 0.14. (c) The matrix P is symmetric and its elements are given by

is

t)

To keep the numerical example simple, the weights ukand are set equal to unity for nonzero flows and infinitely large for zero flows. vk

=

[I -

(-V-’E ) (ET(U-l+ V-l)E)-l

or equivalently, the correction vectors AX = X AY = Y - Y are given by

ax =

-u-’Ep-’D

9

-X

20

16

and (94

(d) The next step is to solve the following set of L simultaneous linear equations to obtain the Q vector. L

and

~41-95

AY = V-IEP-ID

(9b)

where

P

=

ET(U-l

+ V-’)E

j=l

- T)

991

(10)

2091

1691

(11)

It is worth noting that D is the vector of discrepancies in the element balance, that is, the ith element of D, d f , is the error in the ith element balance. The vector Q = P-ID can be obtained by solving the L simultaneous equations given by

PQ

=

D

(12)

+ 2092 + 1693 = 0.04 619,

4-21@ = 0.14

+ 2192 + 53q3 = 0 14

or 91 = -0.03854, 92 = 0.01160, and 93 = 0.00968. (e) Finally, the corrected values, z t and y t are calculated as 21 = zi

Yz = Qr

- c&4

+

(16a)

Ct/Vi

(16b)

eijpj

(17)

where

Numerical Example

The following numerical example is used to illustrate the computational procedure. Consider a reactor with measured flow rates given in Table I.

(15)

I n this case

and

D = ET(X

j = 1,2, . .,L

dj

L

cf = j= 1

Numerical values of ziand ycare given in Table I. Ind. Eng. Chem. Process Des. Develop., Vol. 12. No. 3, 1973

247

Discussion

The objective function defined by eq 1 uses absolute errors. An objective function using relative errors can be constructed by setting

Nomenclature

ut = u1*/212

and

v,

any three of the four element balances are satisfied, the fourth one will also be satisfied. Hence any one of the columns of the element matrix may be eliminated to obtain an independent set of element balance equations.

= vi*/$+=

Since the flow rates of the various species may differ by several orders of magnitude, normally relative errors should be minimized. The problem as formulated here, does not force the solution to be all positive. If corrections are such that a corrected value is negative, the problem can be resolved by assigning higher weighting to that experimental flow rate. The number of independent element balance equations for any system is equal to the rank, R, of the element matrix, E, which must be equal to or less than the number of chemical elements, L , in the system. A system is said to be degenerate when R is less than L. The rank of matrix P is equal to that of E and hence P will be singular in degenerate cases; but the set of equations given by (12) will be compatible. Degenerate systems can be handled by the same computational procedure after eliminating (L- R) columns of E so that the remaining columns form an independent set. For example, the system consisting of HF, HCl, CHCl3, CHClzF, CHClF2, and CHFI is degenerate since there are four chemical elements in the system and the rank of the element matrix is 3. I n this case, if

d, = discrepancy in the j t h element balance (eq 13) etj = number of atoms of j t h element in a molecule of the ith species E = element matrix I = identity matrix L = number of elements N = number of chemical species o = null matrix Pi, = elements of matrix P , defined by eq 14 Q5 = solution to set of eq 15 objective function ut = weighting factor for inlet flow rate of the ith species vi = weighting factor for exit flow rate of the ith species Zt = inlet flow rate of the ith species Yi = exit flow rate of the ith species zj = Lagrange multiplier for the j t h element conservation equation

s =

SUPERSCRIPTS -

*

= =

experimentally measured value modified value or function

literature Cited

Kuehn, D. R., Davidson, H., Chem. Eng. Progr., 57 (6), 44 (1961). Vaclavek, V., Collect. Czech. Chem. Commun., 34, 2662 (1969). RECEIVED for review March 23, 1972 ACCEPTEDJanuary 29, 1973

Effect of Interphase Mass Transfer on Product Selectivity in Liquid-Phase Paraffin Chlorination Michael P. Ramage’ and Roger E. Eckert” School of Chemical Engineering, Purdue University, West Lafayette, Indiana 47907

Product selectivity in the liquid-phase chlorination of n-dodecane in a semibatch reactor was found to be a complicated function of temperature, agitation rate, and chlorine flow rate. These experimental results combined with a surface renewal theory for product selectivity, also developed in this study, are the basis for the following conclusions regarding the liquid-phase chlorination process. Interphase mass transfer limitations in the reaction between gaseous chlorine and liquid n-paraffins alter the yield ratio of secondary/primary monochlorides and cause the ratio of the selectivity to total monochlorides to decrease below the intrinsic value.

T h e monochlorides of the heavier saturated paraffins, such as ndodecane, are used as intermediates in several chemical processes. One specific use for the monochlorides of n-dodecane is in the manufacture of biodegradable detergents. The simplest way to chlorinate these heavier hydrocarbons is by treating liquid hydrocarbon with gaseous chlorine (“liquidphase chlorination”). This eliminates the dehydrohalogenation and pyrolytic reactions which would be associated with 1 Present address, Mobil Research and Development Corporation, Paulsboro, N. J. 08066.

248 Ind.

Eng. Chern. Process Des. Develop., Vol. 1 2 , No. 3, 1973

the vapor-phase chlorination of high boiling point hydrocarbons. In liquid-phase chlorination the effect of interphase mass transfer limitations on not only the rate of reaction but also on the selectivity has to be considered. Product selectivity is described here for fixed conversion by such responses as yield ratio of secondary/primary monochlorides and total yield of monochloride. Only one previous investigator (van de Vusse, 1966) has considered the effect of mass transfer on product distribution in liquid-phase saturated paraffin chlorination. The data of