PROCESS MODEL BASED CONTROL OF DISTILLATION COLUMNS by RUPAK SINHA, B.S. in Ch.E. A THESIS IN CHEMICAL ENGINEERING Submitted to the Graduate Faculty of Texas Tech University in Partial Fulfillment of the Requirements for the Degree of MASTER OF SCIENCE IN CHEMICAL ENGINEERING Approved Accepted December, 1988
135
Embed
PROCESS MODEL BASED CONTROL OF DISTILLATION COLUMNS …
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
PROCESS MODEL BASED CONTROL OF DISTILLATION COLUMNS
by
RUPAK SINHA, B.S. in Ch.E.
A THESIS
IN
CHEMICAL ENGINEERING
Submitted to the Graduate Faculty of Texas Tech University in
Partial Fulfillment of the Requirements for
the Degree of
MASTER OF SCIENCE
IN
CHEMICAL ENGINEERING
Approved
Accepted
December, 1988
—o
-•o
T3
^f^ ACKNOWLEDGEMENTS Ci>pv
I would like to express my sincere appreciation to my graduate
advisor, Dr. James B. Riggs, for his guidance and support throughout
this work. I wish to express my thanks to Dr. R. Russell Rhinehart for
his constructive suggestions.
I would like to dedicate this work to my family, especially my
parents, for their unbending support and love throughout this project
and my academic career.
Last, but not least, I would like to thank my friends who always
took time to listen and make suggestions. I am thankful to Kamal M.
Mchta for his friendship, and Lisa M. Trueba for proofreading this
document.
Appreciation is also extended to Dow Chemicals U.S.A. for
providing the financial support that made this research possible.
11
b J
TABLE OF CONTENTS
ACKNOWLEDGEMENTS ii
LIST OF TABLES v
LIST OF FIGURES vi
NOMENCLATURE vii
CHAPTER
1. INTRODUCTION 1
2 . LITERATURE REVIEW 4
2.1 Dynamic Simulation of a Distillation Column 4
2 . 2 Distillation Control 7
2 . 3 Sidestream Control 17
2.4 Control of High-Purity Columns 19
3 . DYNAMIC MODELING OF A DISTILLATION COLUMN 22
3.1 Tray-to-Tray Model 22
3 . 2 Modelling of High-Purity Columns 26
4. PROCESS MODEL-BASED CONTROL OF A HIGH-PURITY COLUMNS 31
4.1 Process Model-Based Control 31
4.2 Parameterization of Process Model-Based Controller 32
4.3 Implementation of Process Model-Based Controller 36
5 . RESULTS AND DISCUSSION 39
6. DEVELOPMENT AND VERIFICATION OF A STEADY-STATE APPROXIMATE MODEL OF A DISTILLATION COLUMN WITH A SIDESTREAM DRAWOFF 66
6 .1 Model Derivation 66
111
i
6 . 2 Implementation of the Approximate Model 71
6 . 3 Approximate Model Verification 74
7 . CONCLUSIONS AND RECOMMENDATION 85
7 .1 Conclusions 85
7 . 2 Recommendations 86
LIST OF REFERENCES 87
APPENDICES
A. LISTING OF THE COMPUTER CODE FOR PROCESS MODEL-BASED CONTROL OF HIGH-PURITY COLUMN 89
B. DETAILED DERIVATION OF THE APPROXIMATE MODEL FOR A DISTILLATION COLUMN WITH A SIDESTREAM DRAWOFF 106
C. LISTING OF THE COMPUTER CODE FOR THE APPROXIMATE MODEL 115
iv
LIST OF TABLES
PAGE
TABLE 5 .1 Data for PMBC base case ^3
TABLE 6.1 Base case results for approximate model 77
TABLE 6. 2 Data used in the comparison tests 78
TABLE 6.3 Recoveries and Process gains for a change in reflux rate 79
TABLE 6.4 Recoveries and Process gains for a change in sidestream drawoff rate 81
TABLE 6.5 Recoveries and Process gains for a change in boilup rate 83
LIST OF FIGURES
PAGE
FIGURE 2.1 Schematic of the P-DELTA algorithm (Process Design by limiting thermodynamic approximation) 19
FIGURE 2.2 General configuration of the Adaptive Predictive Control System 20
FIGURE 2.3 Desired temperature profile in face of feed
composition change in propane (Dl; colximn 1) 21
FIGURE 3.1 Typical seive tray N 28
FIGURE 3 .2 Flowsheet of the main driver program 29
FIGURE 3 . 3 Flowsheets of subroutines 30
FIGURE 4.1 Flowsheets 37
FIGURE 4.2 Flowsheet of subroutine CONT 38
FIGURE 5.1 Effect of an increase in XSP on bottom tray 44
FIGURE 5.2 Effect of an increase in XSP 45
FIGURE 5.3 Effect of a decrease on XSP on Tray 1 46
FIGURE 5.4 Effect of a decrease in YSP 47
FIGURE 5. 5 Effect of an increase in YSP 48
FIGURE 5.6 Increase in XSP and 5X increase in feed rate; Tray 1....49
FIGURE 5 - 7 Increase in XSP and 102 increase in feed rate; Tray 1... 50
FIGURE 5.8 Increase in XSP and 152 increase in feed rate; Tray 1...50
FIGURE 5.9 Increase in XSP and 102 decrease in feed rate; Tray 1...51
VI
FIGURE 5.10 Increase in XSP and 152 decrease in feed rate; Tray 1...51
FIGURE 5.11 Increase in YSP and 52 increase in feed rate; Tray 1 52
FIGURE 5.12 Increase in YSP and 102 increase in feed rate; Tray 1...52
FIGURE 5.13 Increase in YSP and 152 increase in feed rate; Tray 1...53
FIGURE 5.14 Increase in YSP and 52 decrease in feed rate; Tray 1...54
FIGURE 5.15 Increase in YSP and 102 decrease in feed rate; Tray 1...55
FIGURE 5.16 Increase in YSP and 152 decrease in feed rate; Tray 1...56
FIGURE 5.17 +52 Upset in feed composition; Tray 1 57
FIGURE 5.18 +52 Upset in feed composition; Top Tray 57
FIGURE 5.19 +102 Upset in feed composition; Tray 1 58
FIGURE 5.20 +102 Upset in feed composition; Top Tray 58
FIGURE 5.21 Effect of a 102 upset in feed composition 59
FIGURE 5.22Effect of a 102 upset in feed composition using NLDMC...60
FIGURE 5.23 Effect of a 52 upset in feed composition 61
FIGURE 5.24 Effect of a 52 upset in feed composition using NLDMC....62
FIGURE 5.25 Effect of an increase in XSP 63
FIGURE 5.26 Effect of a decrease in XSP 64
FIGURE 5.27 Effect of a change in gain 65
FIGURE 6.1 Split of the distillation column with a
sidestream drawoff 75
FIGURE 6 .2 Flowsheets for approximate model 76
FIGURE B.l Split of the distillation column with a sidestream drawoff 114
vii
NOMENCLATURE
M Molar tray holdup (moles)
L Liquid flow rate (moles/sec)
V Vapor rates (moles/sec)
h Liquid enthalpy (Btu/lbn,-°F)
H Vapor enthalpy (Btu/lbm-^F)
X(i,j) Liquid composition of component j on tray i
Y(i,j) Vapor composition of component j on tray i
hf Enthalpy of the feed (Btu/lbn,-OF)
F Feed rate (moles/sec)
z Liquid feed composition of the light key
K Equilibrium constant
T Temperature on all trays (°F)
T- Temperature at the top of the column (°F)
T j Temperature at the bottom of the column (°F)
Tf Temperature of the feed coming into the column (°F)
P Pressure in the column (Psia)
S Separation factor
B Bottoms rate (moles/sec)
D Distillate rate (moles/sec)
G Sidestream drawoff rate (moles/sec)
viii
f
f Fractional recovery of comoponet i in the bottoms
g Fractional recovery of component i in the sidestream
dd Fractional recovery of component i in the distillate
a Constant relative volatility.
IX
CHAPTER 1
INTRODUCTION
Distillation is a process widely used in the petroleum and chemical
process industry to separate a mixture into its components. The
separation is based on the fact that the vaporized portion of a liquid
mixture has a composition richer in the more volatile components from
that of the liquid. Binary columns have been widely studied and linear
controllers such as the Proportional-integral (PI) and Proportional-
integral-derivative (PID) usually perform satisfactorily for low purity
columns that also have consistent feed quality and feed flowrate.
However, at moderate purities the binary column exhibits nonlinear
behavior and coupling effects become important. Today, many industrial
areas, such as pharmaceuticals, plastics, and polymer production,
require very high purity products. High purity columns are both
extremely nonlinear and highly coupled thus limiting the applications of
linear model-based multivariable controllers and classical PID
controllers.
Process Model-Based Control (PMBC) is a new controller that has the
potential to overcome the limitations of linear model-based controllers.
PMBC is a multivariable model-based controller which uses an approximate
model directly for control purposes. The approximate model does not
have to be a rigorous simulator, but does need to contain the major
characteristics of the process. The approximate model is adaptively
updated on-line in order to keep it "true" to the process as changes in
the process and process operating conditions occur. Since the PMBC
controller has a relatively accurate description of the process, it
provides nonlinear feedback control along with nonlinear feedforward
control. Therefore, the PMBC controller is able to "anticipate" the
required control action to absorb feed composition and feed flowrate
changes through its feedforward capabilities, as well as absorb the
results of an unmeasured disturbance (heavy or light feed composition
change, cooling water temperature change, head losses, etc.) using its
feedback features. As a result, PMBC can offer significant advantages
for distillation columns that produce high purity products. The
objectives of the first phase of this research are to develop a rigorous
dynamic simulation model for a high purity binary distillation column,
and then test the implementation of the PMBC algorithm to control the
column.
The second phase of this research involves the study of
distillation columns with sidestream drawoffs. A distillation column
that uses a sidestream drawoff can provide substantial economic savings.
Sidestream drawoff can reduce the number of columns required for certain
multicomponent separations. For instance, if we had to separate a
mixture of ABC, it would require two columns, one to separate A from BC
and the other to separate B and C whereas, a distillation column with a
sidestream drawoff could perform the required separation in a single
column. They also can be used for binary separations to obtain
different purities of the two components. Despite these process
advantages of columns with sidestream drawoff columns, control is
inherently more difficult than with conventional columns since there are
more degrees of freedom. Product quality control loops and material
balance control loops are more complex, less direct, often more
sensitive and more interacting. Sometimes unexpected dynamic and steady
state behavior can be observed due to transient and steady state changes
in internal liquid and vapor rates. In order to use all the economic
advantages of a distillation column with a sidestream drawoff, better
control techniques will have to be developed. In order to apply PMBC to
the sidestream column we need an approximate model of a column with a
sidestream drawoff. The last phase of the research includes the (1)
development of an extension of the Smith and Brinkley approximate model
to incorporate the sidestream drawoff and (2) the verification of the
approximate sidestream drawoff model.
CHAPTER 2
LITERATURE REVIEW
2.1 Djmamic Simulation of a Distillation Column
The advent of analog computers in the early 50's allowed attempts
to be made, to model distillation dynamics in a reasonable manner, but
simplifications were imposed by the limitation of the analog equipment
However, the widespread availability of digital computers in the 60's
promted new attack on the d3mamics problem, but a number of earlier
simplifications remained. For instance, Huckaba et al. (1963) limited
their attention to binary distillation at constant pressure, with
constant liquid holdups and negligible vapor holdups. Waggoner and
Holland (1965) required independent specifications of the transient
behavior of the liquid holdups, and vapor holdup was once again
neglected. Levy, Foss, and Grens (1969) effectively treated the
varying liquid holdups but made the following assumptions:
(1) Constant vapor holdup that is small compared to the liquid holdup.
(2) Perfect liquid mixing at every stage.
(3) Negligible holdup in condenser.
(4) Adiabatic column.
(5) Constant liquid holdup in reflux drum and reboiler.
(6) Stationary process, described by linear differential equations for
small perturbations from steady state.
However, in the 70's, linearized, dynamic models were developed.
In their book, Rademaker et al., (1975) extensively cover linearized
dynamic modeling of distillation columns, and they use these models for
stability analysis and control systems design.
Luyben (1973) extensively covers the dynamics of multicomponent
distillation columns, and presents an algorithm using Euler's method to
solve the differential equations. In his approach almost all possible
nonlinarities are eliminated by local linearization, using the following
assumptions:
(1) There is one feed plate onto which vapor and liquid feed are
introduced.
(2) Pressure is constant on each tray but varies linearly up the
column.
(3) Coolant and steam dynamics are negligible in condenser and
reboiler.
(4) Vapor and liquid products are taken off the reflux drum and in
equilibrium. Dynamics of vapor space in reflux drum are
negligible.
(5) Liquid hydraulics are calculated from the Francis weir formula.
(6) Volumetric holdups in the reflux drum and column base are held
constant by changing the bottoms and distillate rates.
(7) Dynamic changes in internal energy on trays are negligible compared
with latent-heat effects, so the energy equation on each tray is
just algebraic.
Luyben also presents a code for the algorithm in his text. However,
with the availability of some differential equation solving packages,
Euler's method is inefficient by contrast.
Sourisseau and Doherty (1982) studied various different dynamic
models and classified them according to the state variables employed.
Following their definitions, a model in which the state vector consists
of only liquid compositions was called the C-model. If both
compositions and enthalpies are included, the CE-model results. The
most complex model is the CHE-model and has a differential equation for
each state variable on each tray (composition, holdup and enthalpy).
The constant molar-overflow model (CMO-model), assumes fast holdup and
energy changes as well as fixed liquid and vapor rates at all times.
Sourisseau and Doherty studied all five dynamic models for various
distillation problems involving relatively ideal mixtures. They
concluded that the transient response results for all of the models were
in good agreement. Furthermore, they concluded that the CE and CHE
models were too time consuming considering the relatively little
additional information obtained; they preferred the use of the C or CMO
models. These conclusions are in agreement with earlier work by Levy et
al. (1969), which indicate that the significant dynamics in distillation
processes are retained in the differential equation modeling liquid
phase compositions.
Chimowitz, Anderson and Macchietto (1985) used the C and CMO models
of Sourisseau and Doherty to present an algorithm for the dynamics of a
multicomponent distillation column using local thermodynamic and
physical property models. They split the system into two tiers, as
shown in Figure 2.1, the inside tier uses an approximate process model
and local thermodynamic models, the outside tier contains a rigorous
thermodynamic model which is used to update the validity of the local
model based upon rigorous thermodynamic evaluations. The system they
investigated was a non-ideal ternary system. One of the characteristics
of this system is that the composition trajectories for adjacent trays
during a transition period can be distinctly different. In their
conclusions they acknowledge the fact that this approach requires larger
storage space, but it significantly improves the execution time, often
by a factor of 5 - 10 when compared to algorithms that rigorous
thermodynamic evaluations. This is a significant improvement especially
when we are considering on-line control of multicomponent distillation
columns.
2.2 Distillation Control
Feedback, feedforward, material balance control, decoupling and
cascade control are some of traditional approaches to distillation
control. All these generally involve PI or PID controllers, however,
distillation processes are non-stationary and nonlinear in nature, and
their operating conditions change frequently. For this reason
computerized distillation control has become an active research topic
for the past decade.
This was the main motivating factor for the development of adaptive
control. Model reference adaptive systems (MRAS), self-tuning
regulators or controllers (STR or STC) and adaptive predictive control
systems (APCS) have been developed from different perspectives.
Martin-Sanchez (1976) developed the adaptive predictive control
system which is related to the traditional dead-beat control idea of
bringing a system to its final state or set point in minimum time. It is
characterized by the following principles:
(1) At each step a future desired process output is generated, and the
control input is computed in order to make the predicted process
output equal to the desired process output.
(2) The predicted output is based on an adaptive predictive (AP)
model, whose parameters are estimated by a recursive estimation law
with the objective of minimizing the prediction error.
(3) The previously mentioned desired process output belongs to a
desired output trajectory, that satisfies a certain performance
criterion, e.g., this trajectory can start from the current 'state'
of the plant and evolve according to some chosen dynamics to the
final desired setpoint.
However, the dead-beat control idea seems impractical because (i) it
requires an exact knowledge of the process model and (ii) its implicit
objective function is closed in nature and generally requires an
excessive control effort. Predictive control as defined by APCS is
unlike dead-beat control. It is in fact a very practical and powerful
strategy because it includes the concept of a desired output trajectory
based on a finite-time horizon objective.
Martin-Sanchez and Shah (1984) introduced the adaptive predictive
control methodology with special emphasis on the key issues involved in
the practical applications of APCS to real processes, using SISO and
MIMO control of a binary distillation column. Figure 2.2 shows a
general confguration of APCS, the specific functions at each control
instant are explained as follows:
The driver block generates a future desired process output value,
that belongs to a desired output trajectory.
The adaptive predictive model is used to generate a control signal
that makes the predictive process output equal to the desired output
generated by the driver block.
The adaptive mechanism: (i) adjusts the adaptive predictive model
to minimize the prediction error and (ii) allows the driver block to
redesign the desired output trajectory for the optimization of the
control system performance.
Martin-Sanchez and Shah also provide the mathematical formulation
and implementation of APCS. Their experimental results easily out
10
perform all classical techniques, and have put APCS beyond the
theoretical stage.
Yu and Luyben (1984) used multiple temperatures for the control of
distillation columns. They studied two columns, one had three
components and thirty-two trays and the other had five components and
twenty trays. Using a steady-state model they proposed three different
control systems as follows:
(1) The Single Temperature Control involves selecting the 'optimum'
tray which gave minimum steady-state error in distillate
composition for the 'worst' disturbance.
(2) The Temperature/Differential Temperature Control follows these
design procedures:
a) find the 'optimum' single temperature control tray;
b) generate the desired temperature profiles for the worst
disturbance case (e.g.. Figure 2.3);
c) locate the section of the column where there is the most
change in temperature differential.
This control works well for lighter than light key (LLK) feed
composition changes, but it may not work as well for light key (LK)
and heavy key (HK) changes in feed composition.
(3) The Temperature/Dual Differential Temperature Control (TD2T) is
based on adjusting the temperature controller using two temperature
differentials. It is almost like the Temperature Differential
Controller except that it works with the temperature that least
11
disturbs the LLK composition. LK and HK feed composition changes
are handled better using this type of controller.
Yu and Luyben concluded that the TD2T controller gave the best overall
performance on both columns. It also has several advantages over the
more complex and conventional 'inferential controls.'
Bryan (1985) studied the heat-integration technique to control
distillation columns. In this method a sequence of distillation columns
has to be chosen and then integrated to provide a joint effect. Heat
integration has some economic advantages in that it can reduce energy
consumption nearly 502 (Roffel and Fontein, 1979) when compared to a
conventional system using steam reboilers and water-cooled condensers.
However, heat integration does have some drawbacks which present many
control problems. Product qualities are difficult to maintain, because
the common reboiler - condenser affects operation in both columns. Also,
changes in the vapor rate in the high-pressure column effect the
performance of the low-pressure column. But the main objective of
Bryan's research was to design a control strategy that could overcome
these problems and still maintain the economic incentives of heat
integration.
There have been some attempts at developing a control strategy for
nonlinear systems, most notable by Morari and Economu (1986). They
extended the Internal Model Control approach to the nonlinear system.
Their paper describes the differences in treating the linear and
nonlinear systems both from a mathematical as well as control point of
12
view. The article shows that even when dealing with processes that have
relatively mild nonlinearities, no linear controller can match the
performance and robustness of a rationally designed nonlinear
controller.
Process Model Based Control (PMBC) is a technique based on the
dynamic simulation of the real process. However, selection of a process
model can be a key factor in the design of the control system; Cott,
Reilly, and Sullivan (1986) present a procedure for the selection of a
process which can be used for PMBC. The ideal model would have the
following qualities:
(1) It would exactly predict the operation of the real process over the
entire operating region with only one set of parameters.
(2) It would require very little computational effort.
However, it is impossible to find a perfect model for a real process.
The two main criteria for selecting a model should be :
(1) Model Accuracy: preference would go to the model that most closely
reflects the real process over the operating region.
(2) Computational Effort: the model requiring the fewest calculations
would be preferred.
They also suggest an algorithm for the integration of the model
selection techniques, accuracy and computational effort as follows:
13
(1) Select candidate model on rough computational effort criterion,
based on control computer capacity.
(2) Determine the accuracy of the candidate models by validating with
respect to the process data.
(3) Determine the computational effort required for each model.
(4) Select the 'best' model, based mainly on accuracy criterion.
This algorithm provides a basis for a model selection procedure for
model-based control.
They also present a detailed application of these techniques to
distillation control. They use the model presented by Luyben (1973) as
the rigorous simulation model and then evaluate four shortcut methods
using the model selection procedure. Process Model Based Control is
then applied using the selected model, which was the Smith-Brinkley
model. The implementation of model-based controllers involves two
steps: a model parameter update and control action calculations. The
controller follows the following pattern:
(1) Model Parameter Update
measure D,B,y,x,L,P from the column;
' back-calculate a pseudo feed stream based on products;
solve for the Smith-Brinkley parameters.
(2) Control Action Calculation
determine the product set points;
measure F,z,P from the column and put through digital filters;
using the filtered data, solve model for L and VP;
implement L and VP on the column.
They also compared PMBC with two other strategies (1) Internal Material
Balance and (2) Dynamic Matrix Control and concluded that PMBC out
performs both techniques.
2.3 Sidestream Control
Despite the process advantages of a sidestream distillation column,
control is inherently more difficult than with conventional columns,
since there are more control variables, interactions and degrees of
freedom.
Luyben (1966), presents a qualitative discussion and comparison of
ten different schemes to control distillation columns with sidestream
drawoffs. The configurations he presents range from simple temperature
and composition control loops to internal reflux or vapor and feed
forward control, using a ternary system. If the feed contains a small
amount of light component, then the light component is taken off the
top. the sidestream is a liquid in the rectifying section. However, if
the feed contains a small amount of the heavy component then the system
is reversed, and the sidestream will be vapor in the stripping section.
In his discussion he has assumed pressure dependence of temperature, and
states that "variations in pressure due to barometric or column pressure
drop changes, may have more effect on temperature than changes in
composition." However, pressure dependence can be reduced by placing
15
the sidestream tray farther away from the end of the column to a spot
where the temperature gradient is steeper and more composition
dependent. The choice of scheme is governed by the economic and process
considerations of the application.
Tyreus and Luyben (1975) applied the sidestream drawoff to study
the control of a binary distillation column. Various schemes were
simulated on a digital computer, but due to the limited range of steady-
state operability, none of the schemes proved satisfactory. But.
controlling the sidestream composition by varying the drawoff tray
location proved to be very successful. The overhead composition was
approximately controlled by holding the temperature of a tray near the
top of the column with reflux flow. Bottoms composition was similarly
controlled by the temperature in the lower section of the column.
Doukas and Luyben (1981) present the 'L' and the 'D' --schemes to
control a two-column configuration consisting of a prefractionator
column and a sidestream column. The 'L'-scheme used the manipulation of
the sidestream drawoff tray location to control one of the sidestream
compositions. While the 'D'-scheme utilized the overhead distillate
product rate from the prefractionator to control one of the sidestream
compositions. The 'D'-scheme can handle the lightest component in the
feed better, while the 'L'-scheme the larger changes in the heaviest
component better. However, they concluded that the 'D'-scheme is much
easier to implement and hence the more favorable scheme to use.
Alatiqi and Luyben (1986) compare the controllability of two
sidestream drawoff configurations. The systems they studied are the
16
sidestream column/stripper configuration (SSS) and the two column
sequential 'light-out-first' (LOF) confguration. They tested a ternary
system of benzene/toluene/o-xylene. In the LOF system the heat inputs
and reflux flow rates to each column can be manipulated, the heat input
to feed ratio (QB/F) provided good control of the column. For the SSS
system they maintained the temperatures of the trays above and below the
sidestream drawoff tray constant by manipulating the sidedraw rate. The
SSS was controlled by four PI controllers. They conclude that the load
response of the SSS was as good as, if not better than the LOF system.
2.4 Control of High-Purity Columns
Fuentes and Luyben (1983) studied the dynamics and controllability
of high-purity columns. They first studied the dynamic responses of the
open-loop system for changes in various manipulated and disturbance
variables in order to gain some insight into the dynamic difficulties
associated with the control of these columns. Then several types of
closed-loop systems were investigated. The system they used had
purities ranging from 5 mol 2 to 10 ppm (molar) impurity in both
distillate and bottoms product for two values of relatively volatility
(a=2 and a-4). They used the following assumptions: constant relative
volatility, equimolal overflow, theoretical trays, total condenser,
partial reboiler, and saturated liquid feed and reflux. To study the
17
open-dynamics they linearized the nonlinear ordinary differential
equations using the Lamb and Rippin technique. From their results they
concluded that the responses are highly nonlinear. The response is
completely different for a positive change than for a negative change.
There is little difference in the dynamic behavior of systems with
different relative volatilities when purity levels are low. However, as
the purity increases, the dynamic response begins to differ greatly for
different relative volatilities. For systems with high relative
volatility the response is quite fast and highly nonlinear. Disturbance
in feed composition is felt rapidly in the bottom of the column.
Fuentes and Luyben then applied a closed-loop control on the
column. They basically used feedback controllers for each end of the
column: reflux was controlling distillate composition and vapor boil-up
controlling bottoms composition. These controllers worked well for low
relative volatility, however, for higher relative volatility the results
were very poor and large errors occurred in the product purities. So it
was concluded that simple product composition controllers cannot be used
for high-purity columns with high relative volatilities. In order to
overcome this problem they studied another controller; the Temperature/
Composition Cascade Controller. This gave a lot better results for the
high relativity columns. In conclusion they state that high purity
columns can be effectively controlled despite their highly nonlinear
behavior. They also conclude that high purity columns respond much
.re quickly than predicted by linear analysis. This fact must be mo]
18
recognized when specifying analyzer cycle times and in designing control
systems.
Georgiou, Georgakis and Luyben (1988) compared the conventional
diagonal control with the Dynamic Matrix Control (DMC) design for
moderate and high purity columns and showed that the performance of DMC
can be significantly improved by the use of nonlinear transformations of
the composition measurements. They studied three systems: one had a
product composition of 992 and 1.02 light component at the top and
bottom, respectively, the other had product purities of 99.92 and 0.12.
The third column was the same as that studied by Fuentes and Luyben
(1983). The first two columns worked well with standard DMC and the
third column was rejected because it had an unstable closed-loop DMC
response. However, using the nonlinear transformations they were able
to control the third column. In conclusion they state that the DMC
performed better that conventional controllers; however, simple
nonlinear output transformations improve significantly the performance
of DMC for high purity columns.
19
• • • 1 i « v • I c
t(i|a«ie>0*a*«iC
O A t * • • • t l
FIGURE 2.1 Schematic of the P-DELTA algorithm (Process Design by limiting thermodynamic approximation)
20
SET POINT ^ onivER BLOCK
i
DESIRED OUTPUT ADAPTIVE
PREOICTIVC MODEL
.
CONTROL SIGNAL ^
•
'
P H W ^ C O O
ADAPTIVE MECHANISM
i
PROCESS OUTPUT ^
FIGURE 2.2 General configuration of the Adaptive Predictive Control System
21
-• i2
i —r 74.
TE/r. a>€s cj
FIGURE 2.3 Desired temperature profile in face of feed composition change in propane (Dl; column 1)
CHAPTER 3
DYNAMIC MODELING OF A
DISTILLATION COLUMN
3.1 Tray-to-Tray Model
Performing dynamic mass and energy balances around each tray are
the first steps in developing a dynamic model of a distillation column
For a typical sieve tray shown in Figure 3.1, the equations are
Total Mass Balance:
dM(N)/dt - L(N+1) + V(N-l) - L(N)- V(N) (3.1)
Component Mass Balance:
dM(N)X(N,J)/dt - L(N+1)X(N+1,J) + V(N-l)Y(N.l,J)
+L(N)X(N,J) - V(N)Y(N,J) (3.2)
Overall Energy Balance:
dM(N)h(N)/dt - L(N+l)h(N+l) + V(N-1)H(N-1) -
L(N)h(N) - V(N)H(N) (3.3)
where there are N-tray and J-components. For every tray there are one
each of equations (3.1) and (3.3) and J-1 of equation (3.2). All the
above equations assume that vapor holdup on each tray is negligible
compared to liquid holdup. For the feed tray the equations are
The solutions of equations (6.14), (6.15) and (6.16) will result in
the required recoveries of component I in each of the exit stream.
Section 6.2 discusses how the program that solves these equations is
implemented along with parameterization of the system.
70
6.2 Implementation of the Approximate Model
6.2.1 Data Entry
The first step in implementing the approximate model is to
parameterize the model using initial guesses for the number of
theoretical stages in each of the sections. The temperatures and
pressures for the sections are set by the distillate, sidestream, feed
and bottoms temperatures and pressure, respectively. Values for the
feed rate, bottoms rate, boilup rate, sidestream drawoff rate and the
reflux rate are read into the program. All other values can be obtained
from material balances. The program is also given the values of the
recoveries in the bottoms, sidestream and the distillate.
6.2.2 Parameterization
To parameterize the column the main program calls the subroutine
PARAM that calculates the number of theoretical stages in each section
of the column. This subroutine uses the same approach as described for
the parameterization of the SB model, used in the high purity column
control in chapter 4, section 4.2. Only for this system there are three
parameters instead of two. Figure 4.1 is a flowsheet of the subroutines
involved in parameterizing the system. Subroutine EVAL calculates the
function values for the Jacobian. The function values are the errors in
the recovery equations (6.14) through (6.16). That is, since the number
of theoretical stages are unknown equations (6.14) through (6.16) are
not exact, even though all the other values are known. Subroutine
71
DERP numerically generates the full Jacobian using equation (4.18). The
Jacobian forms a 3 X 3 matrix which is converted into the following set
of equations by Subroutine PARAM
A(1.1)DI + A(1.2)DN + A(1,3)DM - -B(l) (6.22)
A(2.1)DI + A(2,2)DN + A(2.3)DM - -B(2) (6.23)
A(3.1)DI + A(3.2)DN + A(3.3)DM - -B(3) (6.24)
where Dl. DN, and DM are the changes in the number of theoretical
stages in each section of the column.
These equations are solved by Cramer's rule to give the deviation
in the number of theoretical stages in each section. The entire process
is repeated until the deviations become acceptably small.
Parameterization can be done using either the LK or the HK. To be
consistent the recoveries for each component are used to parameterize
the model. That is, number of theoretical stages of each section
obtained from each component is averaged to give the number of
theoretical stages for each section of the column.
6.2.3 Implementation
Once the system has been parameterized, then the approximate model
can be used to estimate fractional recoveries for a variety of
conditions. Figures 6.2 (a) and (b) are the flowsheets of the program
that evaluate the product recoveries f. g, and d. The main part of the
program is used to call the evaluating subroutine EVAL, read in the data
as stated in the first paragraph of this section, and print out the
results. Subroutine EVAL calls subroutine CONST and KVAL for each
component. Subroutine KVAL calculates the K-values using equilibrium
72
constants for each component. Whereas subrotine CONST calculate the
constant 0, d. a, etc., asing equations (6.17) through (6.21). Finally,
subroutine EVAL solves equations (6.14) through (6.16) to obtain the
required recovery estimates. These values are then compared in the next
section for a specified system with values obtained from a commercial
package.
6.3 Approximate Model Verification
A ^1 Model
The system that was studied is a binary with ethane as the light
key (LK) component and propane as the heavy key component (HK). A
commercial program was used to calculate the initial recoveries by which
the approximate model was parameterized. Table 6.1 shows the
comparison between the recoveries of the approximate model and the
commercial program.
6.3.2 InJM'al Parameters
Table 6.2 shows the parameters used in the model and in the
commercial program. A comparison between the model and the commercial
design package was performed by making changes in the reflux rates, the
sidestream drawoff rates, and the boilup rates.
6.3.3 Description of the Data Tables
The three values predicted by the approximate model were the
recoveries in the distillate, sidestream drawoff and bottoms. These
values and the process gains (K) for each of the changes predicted by
73
the approximate model and the commercial package were compared. Process
gain which is referred to as the gain in the rest of this section is
evaluated as follows:
Kc-Change in recovery (f. g, or d)/Change in (L, G. or V) (6.25)
Tables 6.3 (a) and (b) show a comparison of the recoveries when the
reflux rate is increased or decreased by 3Z and Tables 6.3 (c) and (d)
show a comparison of the gain caused by these changes in both the model
and the commercial program. Tables 6.4 (a) and (b) are the comparisons
for a 3Z increase and decrease in the sidestream drawoff rate, while
Tables 6.4 (c) and (d) are gains for the increase and decrease in the
sidestream drawoff rates. Similarly. Tables 6.5 (a) and (b) are the
comparisons for a 3Z change in the boilup rate and Tables 6.5 (c) and
(d) show the slopes for the changes.
6,3.4 Case Study for Process Gain
Tho process gairt p1- icts the direction of change of the measured
value in comparison to the change in a manipulated variable, the sign of
the gains is extremely important because it also predicts the future
values of the liquid and vapor compositions on each tray. For instance,
if changes caused by a change in the reflux rate in both systems are
studied; then logically for an increase in the reflux rate, it would be
expected that the recovery in the distillate and sidestream drawoff to
increase for the LK and decrease for the HK, indicatingP°^^t^"^® gains
for the LK and negative for the HK. Similarly the sign of the gains is
expected to be the same for a decrease in the reflux rate, however, from
Tables 6.3 (c) and (d) we can see that while the model
74
seems to follow this expected result, whereas, the commercial design
package differs in some places. One of the reasons for this difference
in results could be due to the equilibrium package used by the
commercial program, since there is no technique to duplicate the exact
package and it may not be well suited for this system. Also the values
in certain cases are so small that a minor roundoff error in the
commercial program could have an effect on the sign of the gain.
6.3.5 Conclusions
Based on these comparisons we can conclude that the extension of
the Smith and Brinkley approximate model to include the sidestream
drawoff can be used as an independent approximate model for a
distillation column with sidestream drawoff, and also for further
control studies.
II
III
75
D
^
B
FIGURE 6.1 Split of the distillation column with a drawoff sidestream
76
Read in all data
Yes Parameterize
no
Evaluate
rccoveries
Print results
End
Do # of comp.
Calc. K-Values
Calc. constants
Other calcs.
Calc. f,g. & d
FIGURE 6.2 Flowsheets for approximate model
a) Main program b) Subroutine EVAL
77
0) •o o E
0) (fl
E
X o Wi a a CO u o
LU
> > < LLt
O O
o o
T—
r m (D ^ CO o
CO o IO r T -
o
O) C\J V —
CO CO ^
o o
UJ
o o
00 CD
CO
C\J
d o d
w
3 V) 0) i-t
a; en CO u a> (0 CO
CQ UJ
o cc CL
o o
CO CO o> (O CD O O
-^ CO o y—
CO y—
o
r CM o CNJ CO h-o
U -J OQ <
I
o LU a o
r CJ o o 00 o
T —
o CO 00 y—
CD a> CO CO r
O)
TABLE 6.2 Data used in the comparison tests
CASE STUDIED C2 - C3 MIXTURE
78
1.556 mole/sec
0.2778 mole/sec
0.70056 moles/sec
0.7223 moles/sec
L(1)
•R
Tf
Tb
R
Pf
Pb
0.32478 moles/sec
18.3 DEGF
53.6 DEG F
108.6 DEGF
254.10
254.3 Psia
254.6 Psia
79
TABLES 6.3 Recoveries and Process gains for change in reflux rate a) Recovery for 3Z increase b) Recovery for 3Z decrease
f
g
d
LIGHT KEY
MODEL
0.077337
0.18636
0.73630
COMM PROG.
0.084423
0.18175
0.733827
HEAVY KEY
MODEL
0.76862
0.21815
0.013229
COMM PROG.
0.808164
0.179725
0.012111
f
g
d
MODEL
0.082776
0.18562
0.73160
a
COMM PROG
0.089460
0.175913
0.734627
MODEL
0.78113
0.20856
0.010307
COMM PROG
0.81915
0.170305
0.010545
80
o u * u X D
.—t (4-4
<U u c
H- *
<u bO c c3
X O
V.I
o (4-1
w c
.^ a bO
to w (U o o u a. •o c «0
tfl o
•—1
u o > o o <u
0:2
<U to «0 0) V4 O C
.^
>< r->
V4
o (4-1
c .1-1
CO bO
to to o o o S-i
Ou,
/ " N
CJ
<u to CO (U Ul
o 0)
•D
X r->
>-i
o ( M
c H-t
c bO
to to o u o i-t
a.
^^ •o
r^
> UJ
> > < LU
X
> UJ ^ IH
O _ j
o o cc CL : ^
IE o o
_J UJ Q
o 2
d
PR
O
^
^
o o
_J UJ Q
O 2
in CD CO CNJ
o
.00
o
CO CO r
.00
0
o 1
.00
00
71
5
1
^r^
37
66
-
o o o CD
1
"D
CD h« CO CO
o o o <D
cn CO CO
00
1
o d
18
97
00
0
o o
CNJ
99
7
o
00
0
o o
cn u
^ CNJ TT CO O O
.00
o 1
CNJ
o CO TT TT O O O O
d
51
28
00
0
o o
66
7
CD O O O O
o
•D •D
o o DC 0 .
o o
Q O
O O CC CL
o o
UJ Q o
CO
CO
o o o o
CD o CO r o o o
CNJ
o o o o
eg CO CO r o o o o
CNJ CD TT CO T —
o o o
CD CO CO
r o o o o
CvJ CO Gi CO y—
o o o
in cn CO CO o o o o
o o o
Gi CO r o o o o
o o o o
• D
CNJ
CD O o o o
•D •D
81
e CO 0) U 4J Vi 0)
-O •H Vi
c •H
(U bO C CO
,C o >-l o
(4-1
c CO b O
(0 (A a) o o u
•d C CO (U
to to 0) M
•H M (4-1 0) (4-1
> 9 O 15 O (0
VO
0) (U CO to CO to 0) 0) M M o o C 0)
« »>« m m
o o IM (4-1
u u > > o o o o (U (U
to x>
> •
UJ
> <
m X
o o DC DL
o O
> UJ
X o
UJ Q o
o DC CL
O O
UJ Q O
C O C\J
CO
d
CNJ CNJ
o C O
CD in o in CJ)
o
CO
r CO CNJ 00 o
T t 00
cn
o cn r o CNJ
CD
o CO
d
CO o o CO
CD 00
o o d
cn
CO
CO
o d
in CO C O CO CN]
cn in
CO
O O DC CL
O O
UJ Q O
CO
O O CC DL
o o
UJ Q O
CO
o cn o CO
CO in cn CD
Tt CNJ
o
CvJ
CJ)
o CO
in o o o d
o o cn eg d
CO
CD
d
CO in CO CO r o
in Tt cn CD CO y—
CJ)
Tt
ro
CNJ
o CNJ CJ)
in evj o CO
C7)
82
E
<u 4-) to
T) •r-l to
Q) bC C (0
x: u u o
(4-1
c •.-( CO bO
to to <u o o u
( X I
n c <0
to <u
• I - )
l-l
<u > o CJ 0) o
4J (0 ^
(4-1 tw o ? (0 V-i
-o
(U to (0 <u >-l
o c • r ^
« ro
u o
(4-1
c •r-(
(0 bO
(0 (0 (U o o u
0-,
^ \ o
o to CO <u u o (U
T3
>< C*1
M o
(4-1
c •»-( CO bO
(0 to Q) o o V-i
PL.
^-\ •o
UJ .-J
<
> UJ ^
> -> < UJ X
> UJ ^
GHT
_ j
O o DC CL
^
o o
_J UJ Q O :E
d o DC CL
^ ^ o o
_J UJ Q O 2
CJ) T —
in CNJ o
.00
o 1
CO CO r
o
.00
o 1
r CJ) CD
.000:
o 1
h-
0767
o
.00
o 1
^ ^ •D
C D C D • * "
O o o d
i n GO
0001
d
r
953
001
o o
!003
0002
d
CJ) TJ
CJ) r o o o
.00
o 1
r CD o o o
.00
o 1
CO
722
000
o o
1237
o
.00
o •
TD TJ
o
o o DC CL
o o
UJ Q O
O O CC CL
O o
UJ Q O
CO
o CO h-o o o o
CO CO in T —
o o o
CO
o o o
c\j 00 r o o o o
Tt CO o o o o
in CO
o o o
•00 (D o o o o o d
CO O r C\J o o o
CO CO o o o o o o
CO
eg o o o
CO cn CJ)
o o o
cn • D
CsJ
O O O
TD TJ
83
(U 4J CO U
a. r-l •H O
U3
(U bO C CO
Xi O
M O
(+-I to C <o
•f-» to (0 CO bO (U Vi Vi Oi o o u
PL4
•d c CO
to (U
•H (1) > o o (U
i n
vo
Ui
CQ < H
O C
• H
Oi Vi CO (U >-i O (U
ro ro
U U O O
(4-1 (4-1
M CD > O
o et;
M (U > O o 0)
to X>
> UJ iic: > -
EA
V
X
> UJ ii:: H X O _J
O o DC CL
IE :E o o
_J UJ C2l
O S
d o DC OL
2 2 o o
_J UJ Q O S
i n CD r o 00
o
CNJ CNJ
CD r o
Tt CO eo cn o CD o o
CD CO
cn CD o o
-
r o T —
CD r • • —
o
CNJ
CJ
CNJ
O
CD CO O T —
00
O
r 00 CD OO T —
o
CD
CO T f CNJ CD —
O
o •
CNJ C D CNJ CO
O
O
CD in CM o 00 i n r o
CD
CO Tt r o
TJ
CD O DC Q.
O O
UJ Q o
o o DC CL
O O
UJ Q O
r i n CD CD T —
T f CD Tt CD r C O
d
Gi
in CD o o
T t
in CNJ CO
T t CNJ
o CNJ
in C O CvJ cn o
CO
CD
o CO
in CvJ
o o d
Tf CD
eg
CO Tt CNJ CD O
O O in CO T—
CD in eg eg r^
cn
84
TABLE 6.5 Recoveries and Process gains for change in boilup rate c) Process gain for 3X increase d) Process gain for 3X decrease
df
dg
dd
LIGHT KEY
MODEL
-0.0001396
0.00001102
-0.00001286
COMM PROG.
-0.000333
-0.000000615
0.0003558
HEAVY KEY
MODEL
-0.00009821
0.00007782
0.00002036
COMM PROG.
-0.000114
0.0000138
-0.00003757
df
dg
dd
MODEL
-0.000159
0.00001244
-0.0001462
COMM PROG
-0.00007587
-0.000005196
-0.009314
C
MODEL
-0.00009821
0.00007962
0.00001871
COMM PROG
-0.00000495
-0.00001839
0.00008633
CHAPTER 7
CONCLUSIONS AND RECOMMENDATIONS
7.1 Conclusions
7.1.1 PMBC
Based on the following conclusions PMBC is an excellent strategy
for controlling high purity columns.
(1) In a qualitative comparison to NLDMC used by Luyben et.al. (1988),
PMBC performs better.
(2) PMBC is also almost twice as fast as the NLDMC and also the upset
due to the disturbance is a lot less in the PMBC column.
(3) Similar to Luyben's observation, we also observed that the bottoms
product response time is much more sensitive than the top to the
various upsets and changes.
(4) A very strong similarity was found in the response graphs for all
the tests that were done. That is, for any disturbance or step
change in which ever direction, the path changes slightly, but on
the overall the response path still remains the same.
7.1.2 Sidestream Approximate Model
This approximate model is an extension of the Smith and Brinkley
approximate model for a distillation column to include sidestream
drawoffs. It is computational easy to implement and compares very well
with commercial packages currently in use.
85
86
7.2 Recommendations
Recommendation for continued research in PMBC for high purity
columns should include:
(1) Further exact comparison with other nonlinear control techniques
such as djmamic matrix control (DMC) and internal model control
(IMC).
(2) Extension of this simulator to include multicomponent columns.
Further research on the approximate model should include:
(a) More detailed validation using other commercial packages.
(b) Update the current approximate model to include a vapor
sidestream.
(c) Adding parameters to include pumparounds on the drawoff streams.
(d) Implement this approximate model along with a distillation column
simulator that has a sidestream drawoff.
LIST OF REFERENCES
1. Alatiqi, I.M., and Luyben, W.L., "Alternative Distillation Configurations for Separating Ternary Mixtures with Small Concentrations of Intermidiate in the Feed," Ind. Eng. Cliem. Proc. Pes. Dev.. v24 (1986).
2. Bryan, K.E., Design and Control of a Heat Integrated Distillation Train, M.S. Thesis, TTU, Lubbock, TX (1985).
3. Chimowitz, E.H., Anderson, T.F., and Macchietto, S., "Dynamic Multicomponent Distillation Using Thermodynamic Models," Chem. Engng. Sci.. v40, no 10 (1985).
4. Cott, B.J., Reilly, P.M., and Sullivan, G.R., "Selection Techniques for Process Model Based Controllers," Presentation at AIChE Meeting. July 1986.
5. Doukas, P.N., and Luyben, W.L., "Control of an Energy-Conserving Prefractionators/Sidestream Column Distillation System," Ind. Eng. Chem. Proc. Pes. Dev.. v20, (1981).
6. Funentes. C., and Luyben, W.L., "Control of High-Purity Distillation Columns," Ind. Eng. Chem. Proc. Pes. Dev.. v22 (1983).
7. Georgiou, A., Georgakis. C., and Luyben, W.L., "Nonlinear Pynamic Matrix Control for High-Purity Columns," AIChE Journal. (1988).
8. Holland, C.P., and Liapis, A.I., Computer Methods for Solving Dynamic Separations Problems. McGraw-Hill, New York, (1983).
9. Huckaba, C.E., May, F.P., and Franke. F.R., "An Analysis of Transient Conditions in Continous Pistillation Operation," AIChE Symposium Series. v46, n59 (1963).
10. Lamb, P.E., Pigford, R.L., and Rippin, P.W.T., "Pynamic Responses and Analouge Simulation of Pistillation Columns," Chem. Eng. Prog. Sym. Ser. . 57, (1961).
11. Levy, R.E., Foss, A.S., and Gren, E.A., "Response Modes of a Binary Pistillation Column," I & E.G. Fundamentals. vl8, n4, (1969).
12. Luyben, W.L., Process Modelling. Simulation, and Control for Chemical Engineers. McGraw Hill, New York (1973).
13. Luyben, W.L., "10 Schemes to Control Pistillation Columns with Sidestream Prawoffs," ISA Journal. vl3, n7 (1966).
87
88 14 Martin-Sanchez, J.M., "Adaptive Predictive Control Systems,"
U.S.A. patent no.4, 197,576 (1976).
15. Martin-Sanchez, J.M., and Shah, S.L., "Multivariable Adaptive Predictive Control of Binary Distillation Column," Automatica. v20, n5 (1984).
16 Morari, M., and Economu, C.G., "Internal Model Control. 5. Extension to Nonlinear Systems," Ind. Eng. Chem. Proc. Des. Dev.. v25 (1986).
17 Rademaker, 0., Rijnsdrop, J.E., and Maarlveld, A., Dynamics and Control of Continous Distillation Units. Elsevier, Amsterdam (1975).
18. Reid, R.C., Prausnitz, J.M., and Polling, B.E., The Properties of Gases and Liquids. Mc-Graw Hill, New York (1987).
19. Roffel, B., and Fontein, H.J., "Constraint Control of Distillation Processes, "Chem. Eng. Science, v34 (1979).
20. Smith, B.D., and Brinkley, W.K., "General Short-Cut Equation for Equilibrium Stage Process," AIChE Journal. Sept. (1960).
21. Sourisseau, J., and Doherty, M.F., "On Dynamics of Distillation Process-IV. Uniqueness and Stability of the Steady State in Homogenous Continous Distillation," Chem. Engng. Sci.. v37, (1982)
22. Tyreus, B., and Luyben, W.L., "Control of a Binary Distillation Column with a Sidestream Drawoff," Ind. Eng. Proc. Des. Dev.. vl4 (1970).
23. Yu, C C , and Luyben, W.L. , "Use of Multivariable Temperatures for the Control of Multicomponent Distillation Columns," Ind. Eng. Chem. Proc Des. Dev.. v23 (1984).
APPENDIX A
LISTING OF THE COMPUTER CODE FOR PROCESS MODEL-BASED
CONTROL OF HIGH PURITY COLUMN
89
90
c********************************************************************* C*** PROGRAM FOR THE SIMULATION *•* C*** AND PROCESS MODEL BASED CONTROL *** C*** OF HIGH PURITY COLUMNS *** C*** *** C*** PROGRAMMER: RUPAK SINHA (B.S. CHE) **• C*********************************** **•*****••*•*••*******•******•****
c THIS PROGRAM FIRST SIMULATES A BINARY HIGH PURITY COLUMN AND THEN
PARAMETRIZES THE SMITH AND BRINKLEY APPROXIMATE MODEL TO OBTAIN THE NUMBER OF THEORETICAL STAGES IN THE WHOLE COLUMN AND THIS APPROXIMATE MODEL IS USED TO CONTROL THE COLUMN.
C C C C C C C C C C c**********************************************************************
THE SYSTFJ1 STUDIED WAS A BINARY MIXTURE OF 02 - Ot WITH 30X C2 AND 702 a*. RANGE-KUTTA METHOD WAS USED TO INTEGRATE THE ODE'S. THE EQUILIBRIUM CALULATIONS ARE DONE USING A LINEARLY VARYING CONSTANT RELATIVE VOLATILITY.
C C C C C C C c c C C C C c c C c c c c c c c c C c c c c c c c c c c
NOMENCLATURE X - THE LIQUID COMPOSITION (MOLES) Y - VAPOR COMPOSITION (MOLES) DYDX - IS THE ODE FOR THE COMPONENT BALANCE ON EACH TRAY TAU - ARE THE TIME CONSTANTS FOR THE CONTROL LAW K - ARE THE EQUILIBRIUM CONSTANTS TFC - TEMPERATURE OF THE FEED IN THE COLUMN (DEG F) TBC - TEMPERATURE IN THE BOTTOM OF THE COLUMN (DEG F) TTC - TEMPERATURE IN THE TOP OF THE COLUMN (DEG F) PC - PRESSURE IN THE COLUMN (PSIA) XF - COMPOSITION OF THE FEED (MOLES) F - FEED RATE (MOLES/SEC) R - REFLUX RATE (MOLES/SEC) V - BOILUP RATE (MOLES/SEC) XB - LIGHT COMPOSITION IN THE BOTTOM (MOLES) YD - LIGHT COMPOSITION IN THE TOP OF THE COLUMN (MOLES) NP - NUMBER OF THEORETICAL TRAYS IN THE WHOLE COLUMN MP - NUMBER OF THEORETICAL TRAYS IN THE STRIPPING SECTION NT - TOTAL NUMBER OF TRAYS IN THE COLUMN ALPHA - CONSTANT RELATIVE VOLATILITY KI & K2 - GAINS FOR THE CONTROL LAW F.RLIM - ERROR LIMIT FOR CONVERGENCE NITR - TOTAL NUMBER OF ITERATIONS HWS - WEIR HEIGHT IN THE STRIPPING SECTION (FT) MUR - WEIR HEIGHT IN THE RECTIRTING SECTION (FT) XLWS - WEIR LENGTH IN THE STRIPPING SECTION (FT) XIWR - WEIR LENGTH IN THE RECTIFYING SECTION (FT) DTS - DIAMETER OF THE COLUMN IN THE STRIPPING SECTION (FT) DTR - DIAMETER OF THE COLUMN IN THE RECTIFYING SECTION (FT)
DEN - DENSITY OF THE COMPONENTS VR - VOLUME OF THE REBOILER (FT3) CAY1.CAY2.CAY3. & CAY^ ARE THE INTERMIDIATE CALULATIONS FOR
THE RUNGE-KUTTA METHOD. T - TIME (SEC) DT - STEP CHANCE
91
C XSP - SETPOINT FOR THE BOTTOM COMPOSITION C YSP - SETPOINT FOR THE TOP COMPOSITION C ALL OTHER VARIABLES ARE DEFINED AS THEY APPEAR IN THE PROGRAM.
C MAIN PROGRAM C
C
C c c
c c c
c c
c c c
IMPLICIT REAL*8(A-H.0-Z) DIMENSION XM(50).X(50).Y(IOO),DYDX(100),TAU(2) DIMENSION CAY1(100).CAY2(100).CAY3(100).CAY4(100).Y1(100) COMMON /ONE/DC. BC, XC. YC,TFC. TTC, TBC. PC. FC. ZC, KT. KC COMMON /TWO/ ERLIM.NITR,K1.K2.TAU.XINT.YINT.DI.ITYPE COMMON /ON9/ALFA(50),NT.R.V,F.XF.NF.DEN,HWS,HWR,XLUS,XLWR,DTS.DTR COMMON /TW9/ XLL(50).XB.YD.VR.VA.YC1(50) REAL*8 L1.NP.MP.NA.M1.K1(2),K2(2).KT(2).KC(2)
READ IN SOME OF THE CONTROLLER DATA
CALL DATAIN
INITIAL DATA FOR THE COLUMN
XB-.A786AE-3 Y D - . 9 9 8 8 8 NTRAYS-16 NT-NTRAYS+2
NF IS THE FEED TRAY
NF-10 THE LARGEST AND SMALLEST VALUE FOR THE CONSTANT RELATIVE
VOLATILITY
AT-A.56 A B - 4 . 0 5 BETA - 0 . GAM - l . O D - 0 1 DA-(AT-AB) /17 . DO 77 I - l . N T
77 ALFA(1)-AB+DA*FL0AT(I-1) R - 6 0 0 0 . 0 / 3 6 0 0 . V - 7 0 0 0 . 0 0 / 3 6 0 0 . FO - 3 4 0 0 . / 3 6 0 0 . FN - A 0 8 0 . / 3 6 0 0 . XO - 0 . 3 XN - 0 . 3 5 F-BETA*FN + (1-BETA)*F0 XF-GAM*XN+(1-GAM)*X0 DEN-0.9 VR-.120. VA-VR H U S - 1 . / 6 . HWR-HWS XLWS-8.6 XLWR-6.8 D T S - 1 0 . 5
C CALL THE PARAMETERIZATION PROGRAM TO PARAMETERIZE THE SIMITH AND
C BRINKLEY APPROXIMATE MODEL
C
CALL PAKAM(NP.MP.Vl.Ll)
C IF(I.NE.55)STOP
N6-NP
Ml-MP
C
C CALL TWE CONTROLLER FOR UPDATED VALUES OF THE VAPOR AND
C LIQUID FLOWRATE OF THE COLUMN
C
CALL CONT(NA.Ml.XSP.YSP.VI.Ll)
R-Ll
V-Vl
C CALL SUBROUTINE TO CALCULATE THE INTIAL DYDX FOR THE SYSTEM
C
93
1 CALL F'X(T.Y.DYDX) C
C START THE STEP SIZE CALCULATOR FOR THE RUNGE-KUTTA METHOD C
DDD-DYDX(l) IM-1 IF(DABS(DyDX(l)).LT.1.E-10)DDD-1.E-10 DXM-DABS^*Y(1)/DDD) DO 2 1-2.NE IF(DABS(DYDX(I)).LT.1.E-10)TEST-1.E20 IF(DABS(DYDX(l)).LT.l.E-10)GO TO 2 TEST-DABS(P*Y(I)/DYDX(I)) IF (DABS(TEST).LT.DXM)IM-I
C C ****** START SUBROUTINE TO LINEARIZE EQUAATIONS
C
C THIS SUBROUTINE USES THE THOMAS METHOD TO LINEARIZE THE
C NONLINEAR EQUATIONS.
C SUBROUTINE TM(N.C.D.E.B.X)
94
IMPLICIT REAL*8(A-H.0-Z) DIMENSION C(50).D(50).E(50).B(50).X(IOO).BETA(50).GAM(50) BETA(1)-D(1) GAM(1)-B(1)/BETA(1) DO 10 1-2,N BETA(I)-D(I)-C(I)*E(I-1)/BETA(1-1)
10 GAM(I-1)-(B(I)-C(I)*GAM(I-1))/BETA(I) X(N)-GAM(N) DO 20 1-2.N
J-N-I+1 20 X(J)-GAM(J)-E(J)*X(J+1)/BETA(J)
RETURN END END SUBROUTINE TM C****
C
c ***** c c c c c
c c c
c c c
START SUBROUTINE FX
C C C
THIS SUBROUTINE CALCULATES THE ODES USING THE COMPONENT BALANCE AT THE TRAY. IT ALSO CALULATES THE VAPOR COMPOSITION USING CONSTANT RELATIVE VOLATILITY.
SUBROUTINE FX(T,Y,DYDX) IMPLICIT REAL*8(A-H,0-Z) DIMENSION Y(IOO).DYDX(IOO).XL(50).XM(50).X(50).YC(50),YX(50) COMMON /0N9/ALFA(50),NT.R.V,F.XF.NF.DEN.HWS.HWR.XLWS.XLWR,DTS.DTR COMMON /TW9/XLL(50).XB.YD,VR.VA.YC1(50) XLS-R+F XLR-R DO 88 I-1,NF
88 XLL(I)-XLS NFP-NF+1 DO 89 I-NFP.NT
89 XLL(I)-XLR DO 84 I-l.NT
84 XL(I)-XLL(I) CALL SUBROUTINE TO CALCULATE LIQUID HOLDUP
CALL LHDUP(XM.XLS,XLR)
EF IS THE EFFEICIENCY OF THE TRAY
EF-.75
START CALCUI.ATING THE VAPOR COMPOSITION
DO 2 I-l.NT YX(I)-ALFA(I)*Y(I)/(1.+(ALFA(I)-1.)*Y(I))
2 IF(YX(I).GT.1.)YX(I)-1.
YC(1)-YX(1) YC(NT)-YX(NT) NTM-NT-1 DO 9 1-2.NTM
9 YC(I)-YC(I 1)+EF*(YX(I)-YC(I-1))
SETUP THE ODE ODE FOR THE REBOILER
95
DYDX(1)-(Y(2)*XLS-YC(1)*V.(XLS-V)*Y(1))/XM(1) NTM-NT-1 DO 3 1-2,NTM
C
C ODE FOR ALL TRAYS C
3 DYDX(I)-(XL(I+1)*Y(I+1)-Y(I)*XL(I)+V*(YC(I-1)-YC(I)))/XM(I) C C ODE FOR FEED TRAY C
DYDX(NF)-DYDX(NF)+XF*F/XM(NF) D-V-R
C C ODE FOR CONDENSER C
DYDX(NT)-(V*YC(NT.1)-R*Y(NT)-D*Y(NT))/XM(NT) DO 666 I-1,NT
666 YCl(I) - YC(I) RETURN END
C****** END SUBROUTINE FX C C***** START SUBROUTINE LHDUP C
SUBROUTINE LHDUP(XM.XL) C THIS SUBROUTINE CALCULATES THE MOLAR HOLDUP ON EACH TRAY C USING THE LIQUID FLOWRATE AND THE FRANCIS WEIR FORMULA C
IMPLICIT REAL*8(A-H.0-Z) DIMENSION XL(50).XM(50).H(50) COMMON /0N9/ALFA(50).NT.R.V.F,XF.NF.DEN.HWS.HWR.XLWS.XLWR.DTS.DTR COMMON /TW9/XLL(50).XB.YD.VR.VA.YCl(50) NFP-NF+1 DO 1 I-l.NF H(I)-((R+F)/(3.33*XLWS*DEN))**.6667+HWS
1 XM(I)-H(I)*3.14*DTS*DTS*DEN/4.
DO 2 I-NFP.NT H(I)-(R/(3.33*XLWR*DEN))**.6667+HWR
2 XM(I)-H(I)*3.14*DTR*DTR*DEN/4. C C HOLDUP ON IN THE REBOILER AND CONDENSER ARE CONSTANT
C
XM(l)-440. XM(NT)-440. RETURN END
C***** END SUBROUTINE HDLUP C C***** START SUBROUTINE DATAIN
C SUBROUTINE DATAIN
C FEED IN ALL THE DATA FOR THE CONTROLLER
C IMPLICIT REAL*8(A-H.0-Z) COMMON /TWO/ ERLIM.NITR.Kl.K2.TAU(2).XINT.YlNT.DT.ir.'PE
96
COMMON /THREE/XSP.YSP.N.M
COMMON /EDATA/TCl.TC2.PCI.PC2.W1.W2
COMMON /FOUR/ BHV.THV.STMHV.FHV.HWMAX.HWMIN
REAL*8 N.M.KT(2).KB(2).L.K1(2).K2(2)
ITYPE-1
ERLIM-l.E-6
NITR-75.
TAU(1)-1.0
TAU(2)-1.2
Kl(l)-2.05
Kl(2)-2.05
K2(l)-1.0E-03
K2(2)-1.0E-03
XINT-0.0
YINT-0.0
TCl-305.4
TC2-425.2
PC1-48.8*14.7
PC2-38.0*14.7
W1-.099
W2-.199
STMHV-928.
THV-4552.
BHV-5808.
FHV-150.
HWMAX-4.E6
HWMIN-.5E6
RETURN
END
C ***** END SUBROUTINE DATAIN
C
C****** START SUBROUTINE CONT
C
C************************ ABSRACT *••*****•**•••**••*************•****• C
C
C
C
C
C
C
C
C
C
THIS SUBROUTINE CALCULATES THE VAPOR AND LIQUID FLOW RATES (V & L)
BASED UPON THE PROCESS MODEL BASED CONTROL LAW. THE CONTROL LAW
DETERMINES MODIFIED COMPOSITION FOR THE LIGHT COMPONENT IN THE BOTTOMS
AND THE OVERHEAD (XSPP AND YSPP. RESPECTIVELY). THEN A NETOWN'S
SEARCH IS USED TO FIND V AND L THAT SATISFY THE SMITH-BRINKLEY MODEL
WITH XSPP AND YSPP- THIS CONTROLLER CAN ALSO BE USE TO CONTROL
THE BOTTOMS COMPOSITION (X) USING ONLY V ( USE ITYPE-2) OR TO
CONTROL THE OVERHEAD CONPOSITION USING ONLY L (USE ITYPE-3).
C KT(1)- THE K VALUE OF THE ITH COMPONENT FOR THE ARFJK OF COLUMN ABOVE C THE FEED TRAY (I-l LIGHT COMPONENT; 1-2 HEAVY COMPONENT) C K1(I)- TUNING PARAMETER FOR THE PROPORTIONAL TERM IN THE CONTROL LAW C K2(I)- TUNING PARAMETER FOR THE INTEGRAL TERM IN THE CONTROL LAW C L.Ll- THE REFLUX FLOW RATE (#MOLES/HR) C M.Ml- THE NUMBER OF THEORITICAL STAGES BELOW THE FEED TRAY C N.NI- THE TOTAL NUMBER OF THEORITICAL STAGE IN THE COLUMN C NERS- THE NUMBER OF VARIABLE THAT DO NOT MEET CONVERGENCE CRITERIA C TB- THE BOTTOMS TEMPERATURE (DEG F) C TEST- THE RELATIVE ERROR IN A VARIABLE C TF- THE TEMPERATURE OF THE FEED (DEG F) C TM- THE AVERAGE TEMPERATURE IN THE STRIPPING SECTION (DEG F) C TN- THE AVERAGE TEMPERATURE IN THE RECTIFYING SECTION (DEG F) C TT THE TEMPERATURE AT THE TOP OF THE COLUMN (DEG F) C V.Vl- THE VAPOR BOIL-UP RATE (/!IM0LES/HR) C XINT- THE INTEGRAL TERM VALUE FOR THE BOTTOMS COMPOSITION C XSP- THE SET POINT FOR THE LIGHT COMPONENT IN THE BOTTOMS (MOLE FRAG) C XSPP- THE MODIFIED COMPOSITION FOR THE LIGHT COMP IN THE BOTTOMS C YINT- THE INTEGRAL TERM VALUE FOR THE OVERHEAD COMPOSITION C YSP- THE SETPOINT FOR THE HEAVY COMPONENT IN THE OVERHEAD (MOLE FRAC) C YSPP- THE MODIFIED COMPOSITION FOR THE HEAVY COMP IN THE OVERHEAD C C************************************************************************ c
SUBROUTINE C0NT(N1.Ml.XSP.YSP.VI.LI) IMPLICIT REAL*8(A-H.0-Z) DIMENSION A(2.2).C(2) COMMON /ONE/ D.B.X.Y.TF.TT.TB.P.F.Z.KT.KB COMMON /TWO/ ERLIM.NITR.K1.K2,TAU(2).XINT.YINT.DT.ITYPE REAL*8 N,M.KT(2).KB(2).K1(2).K2(2).L1.L.G(2).N1.M1
L-Ll V-Vl N-Nl M-Ml
C CALCULATE AVERAGE TEMPERATURES IN STRIPPING AND RECTIFYING SECTIONS
TN-.5*(TT+TF) TM-.5*(TF+TB)
C CALCULATE K VALUES FOR BOTH SECTIONS OF THE COLUMN CALL EQL(TN.P,KT) CALL EQL(TM.P.KB)
C APPLY CMC CONTROL LAW I.E.. CALCULATE MODIFIED COMPOSITIONS XSPP-X-TAU(1)*K1(1)*(X-XSP)-TAU(1)*K2(1)*X1NT YSPP-Y-TAU(2)*K1(2)*(Y-YSP)-TAU(2)*K2(2)*Y1NT
C C BEGIN THE ITERATIVE NEWTON'S SEARCH FOR L AND V THAT SATISFY THE C SMITH-BRINKLEY MODEL WITH XSPP AND YSPP
C ICT-O
1000 ICT-ICT+1 C CALCULATE THE JACOBIAN AND THE FUNCTION VALUES
CALL DERC(N.M.V.L.XSPP.YSPP.A.C)
C CALCULATE THE CHANGE IN V AND L C ( 2 ) - ( - A ( 2 . 1 ) * C ( l ) + A ( l . I ) * C ( 2 ) ) / ( A ( 2 . 1 ) * A ( 1 . 2 ) - A ( l . l ) * A ( 2 . 2 ) )
98
C(l)-(-C(l)-A(1.2)*G(2))/A(l.l) C CHECK FOR BOTTOMS CONTROL ONLY
C C THIS SUBROUTINE CALCUUVTES THE DERIVATIVE OF THE TWO EQUATIONS THAT C RESULT FORM THE SMITH-BRINKLEY MODEL WITH RESPECT TO V AND L. THE C DERIVATIVES ARE CALCULATED BY FINITE DIFFERENCE APPROXIMATIONS. THE C ANSWERS ARE STORED IN A(I.J). A(I.J) IS THE JACOBIAN OF THE TWO C NONLINEAR EQUATIONS. C C*************************** NOMENCALTURE ***************************** C C A(I.J)- THE JACOBIAN OF THE ITH EQUATION WITH RESPECT TO THE JTH C VARIABLE ( J-1 V; J-2 L) C B(I)- THE VALUE OF THE ITH EQUATION C DELTA- THE FRACTIONAL CHANGE IN V AND L USED TO CALCULATE THE C NUMERICAL DERIVATIVES C F(I)- THE EQUATION VALUE OF THE ITH EQUATION C L.L1.L2- THE REFLUX LIQUID FLOW RATE (#MOLES/HR) C M.Ml- THE NUMBER OF THEORITICAL STAGES IN THE RECTIFYING SECTION C N.NI- THE NUMBER OF THEORITICAL STAGES FOR THE COLUMN C V .V1.V2- THE VAPOR BOIL-UP RATE FOR THE REBOILER (ilfMOLES/HR)
99
C X.Xl C Y.Yl C
THE COMPOSITION OF THE LIGHT COMP IN THE BOTTOMS THE COMPOSITION OF THE HEAVY COMP IN THE OVERHEAD
C THIS SUBROUTINE CALCULATES THE K VALUES FOR EACH COMPONENT FROM
THE TEMPERATURE AND PRESSURE
NOMENCALTURE C*************************
c K(I)- THE K VALUE OF THE ITH COMPONENT ( 1-1 LIGHT; P- PRESSURE (PSIA)
******************************
C c c c c c c c c c c c c
1-2 HEAVY )
PCI- THE CRITICAL PRESSURE OF THE LIGHT COMP (PSIA) PC2- THE CRITICAL PRESSURE OF THE HEAVY COMP (PSIA) PH- THE FUGACITY COEFICIENT FOR THE VAPOR PHASE PHI- THE FUGACTIY COEFICIENT FOR THE HEAVY COMP PHX- THE FUGACITY COEFICIENT FOR THE LIGHT COMP PL- A-B/(T+C) IN THE ANTOINE EQUATION PR- THE REDUCED PRESSURE T- TFMPERATURE (DEG F) TCI- THE CRITICAL TEMPERATURE OF THE LIGHT COMP (DEG K) TC2- THE CRITICAL TEMPERATURE OF THE HEAVY COMP (DEG K) TK- TEMPERATURE (DEG K)
100
C TR- THE REDUCED TEMPERATURE C VP- THE VAPOR PRESSURE (PSIA) C Wl- THE ACENTRIC FACTOR FOR THE LIGHT COMP C W2- THE ACENTRIC FACTOR FOR THE HEAVY COMP C C******************************************^k.********^****^t^*^^^^^^*^^^^***
C SUBROUTINE EQL(T.P.K) IMPLICIT REAL*8(A-H.0-Z) COMMON /EDATA/TCl.TC2.PCI.PC2.Wl.W2 REAL*8 K(2)
C CALCULATE TEMPERATURE IN DEGREES KELVIN TK-(T+460.)*5./9.
C CALCULATE REDUCED TEMPERATURE AND PRESSURE FOR LIGHT COMPONENT TR-TK/TCl PR-P/PCl
C CALCULATE VAPOR PRESSURE FOR LIGHT COMPONENT PL-IO.072-1976.1/(TK+12.894) VP-14.69*DEXP(PL)
C CALCULATE FUGACITY COEFICIENT FOR VAPOR PHASE PHX-PH(TR.PR.Wl)
C CALCULATE K VALUE FOR LIGHT COMPONENT
K(1)-VP/(PHX*P) C CALCULATE REDUCED PRESSURE AND TEMPERATURE FOR HEAVY COMPONENT
TR-TK/TC2 PR-P/PC2
C CALCULATE VAPOR PRESSURE FOR HEAVY COMPONENT PL-9.4928-2067.3/(TK-13.437) VP-14.69*DEXP(PL)
C CALCULATE FUGACITY COEFICIENT FOR VAPOR PHASE PHI-PH(TR.PR.W2)
C CALCULATE K VALUE FOR HEAVY COMPONENT K(2)-VP/(PHI*P) RETURN END
C C**************************** ABSTRACT *******************************
C C THIS FUNCTION SUBROUTINE CALCULATES THE FUGACITY COEFICIENT FOR C A COMPONENT FROM THE REDUCED TEMPERATURE. REDUCED PRESSURE, AND THE
C ACENTRIC FACTOR C C************************* NOMENCLATURE **•*••***•******•*********•***
C C PH- FUGACITY COEFICIENT C PR- THE REDUCED PRESSURE C TR- THE REDUCED TEMPERATURE C W- THE ACENTRIC FACTOR
C C***********************************************************************
C C*************************** ABSTRACT *********•***•***•**•*•***••***• C
C THIS SUBROUTINE CALCULATES THE ERROR IN EACH OF THE TWO NONLINEAR C EQUATIONS RESULTING FROM THE APPLICATION OF THE SMITH-BRINKLEY MODEL C C************************* NOMENCLATURE **•******•*****•••••***••**•** C C B- BOTTOMS PRODUCT FLOW RATE (JJIMOLES/HR) C D- OVERHEAD PRODUCT FLOW RATE (#MOLES/HR) C F- FEED FLOW RATE (#MOLES/HR) C FX(I)- THE ERROR IN THE ITH EQUATION C FD(I)- THE RECOVERY OF THE ITH COMP IN THE BOTTOMS PRODUCT C (I-l LIGHT; 1-2 HEAVY) C HD(I)-C KB(I)- THE K VALUE IN THE STRIPPING SECTION (I-l LIGHT; 1-2 HEAVY) C KT(I)- THE K VALUE IN THE RECTIFYING SECTION (I-l LIGHT; 1-2 HEAV ') C L- THE REFLUX LIQUID FLOW RATE (IMOLES/HR) C R- THE REFLUX RATIO (I.E.. R-L/D) C SM(I)- THE SEPARATION FACTOR FOR THE ITH COMP IN THE STRIPPING SECTIO C SN(I)- THE SEPARATION FACTOR FOR THE ITH COMP IN THE RECTIFTING SECT C V- THE VAPOR BOIL-UP RATE FROM THE REBOILER (idMOLES/HR) C X- THE MOLE FRACTION OF THE LIGHT IN THE BOTTOMS PRODUCT C Y- THE MOLE FRACTION OF THE LIGHT IN THE OVERHEAD PRODUCT C Z- THE MOLE FRACTION OF THE LIGHT IN THE FEED C C***********************************************************************
c SUBROUTINE FUN(N.M.V.L.X.Y.FX) IMPLICIT REAL*8(A-H.0-Z) COMMON /ONE/ D.B.Q.E.TF.TT.TB.P.F.Z.KT.KB REAL*8 N.M.L.KT(2).KB(2).SN(2).SM(2).FX(2).FD(2).HD(2) D-F*(Z-X)/(Y-X) B-F-D R-L/D VB-V/B
C CALCULATE THE SEPARATION FACTORS DO 1 1-1.2 SN(I)-KT(I)*((R+1.)/R)
1 SM(I)-KB(I)*VB/(VB+1.) DO 99 1-1.2
99 IF((SN(I).LT.O.).OR.(SM(I).LT..O))PR1NT 55.SM(I).SN( I) .V.L. F
55 FORMAT( 3H S-.5E12.5) C CALCULATE THE H FACTORS
DO 2 1-1.2
2 HD(I)-SM(I)*(1-SN(I))/(SN(I)*(I-SM(I)))
C CALCULATE THE RECOVERIES IN THE BOTTOMS
FD(1)-B*X/F/Z FD(2)-B*(1.-X)/(F*(1 -Z))
C CALCUUTE THE ERROR IN THE SMITH-BRINKLEY MODEL EQUATIONS DO 3 1-1.2 X1-(1.-SN(I)**(N-M))*R*(1.-SN(I))
C C************************ ABSRACT *************************************
C C THIS SUBROUTINE CALCULATES THE NUMBER OF THEORITICAL STAGES FOR C THE COLUMN AND FOR THE STRIPPING SECTION. FILTERED STEADY-STATE DATA C FOR THE REFLUX RATE. THE VAPOR BOIL-UP RATE. FEED RATE. AND THE C COMPOSITON OF THE LIGHT COMPONENT IN THE BOTTOMS AND OVERHEAD ARE C PROVIDED TO THIS SUBROUTINE. THE VALUES OF N AND M ARE FOUND USING A C A NEWTON'S SEARCH TO SATISFY THE SMITH-BRINKLEY MODEL. C C************************ NOMENCLATURE ********************************
C C A(I,J)- THE PARTIAL OF THE ITH EQUATION WITH RESPECT TO THE JTH C UNKNOWN'. (J-1 IS N; J-2 IS M) C C ( I ) - THE FUNCTION VALUE OF THE ITH EQUATION C ERLIM- THE RELATIVE ERROR CRITERIA FOR CONVERGENCE OF THE NEWTON'S C SEARCH C G(I)- THE CHANGE IN THE UNKNOWNS CALCULATED BY THE NEWTON'S SEARCH
C ICT- AN ITERATION COUNTER C KB(I)- THE K VALUE OF THE ITH COMPONENT FOR THE AREA OF COLUMN BELOW C THE FEED TRAY(I-1 LIGHT COMPONENT; 1-2 HEAV ' COMPONENT) C KT(I)- THE K VALUE OF THE ITH COMPONENT FOR THE AREA OF COLUMN ABOVE C THE FEED TRAY (I-l LIGHT COMPONENT; 1-2 HEAVY COMPONENT) C L.Ll- THE REFLUX FLOW RATE (l!fMOLES/HR) C M.Ml- THE NUMBER OF THEORITICAL STAGES BELOW THE FEED TRAY C N Nl- THE TOTAL NUMBER OF THEORITICAL STAGE IN THE COLUMN C NERS- THE NUMBER OF VARIABLE THAT DO NOT MEET THE CONVERGENCE CRITERI C TB- THE BOTTOMS TEMPERATURE (DEG F) C TEST- THE RELATIVE ERROR IN A VARIABLE C TF- THE TEMPERATURE OF THE FEED (DEG F) C TM- THE AVERAGE TEMPERATURE IN THE STRIPPING SECTION (DEG F) C TN- THE AVERAGE TEMPERATURE IN THE RECTIFYING SECTION (DEG F) C TT- THE TEMPERATURE AT THE TOP OF THE COLUMN (DEG F) C X- MOLE FRACTION OF THE LIGHT COMP IN THE BOTTOMS PRODUCT C Y- MOLE FRACTION OF THE LIGHT COMP IN THE OVERHEAD PRODUCT
IMPLICIT REAL*8(A-H.0-Z) DIMENSION A ( 2 . 2 ) . C ( 2 ) COMMON /ONE/ D . B . X . Y . T F . T T . T B . P . F. Z. KT. KB COMMON /TWO/ ERLIM.NITR.K1.K2.TAU(2).XINT.YINT D T m P E REAL*8 N . M . K T ( 2 ) . K B ( 2 ) . K 1 ( 2 ) . K 2 ( 2 ) . L 1 . L . G ( 2 ) . N 1 . M 1
C CALCULATE THE JACOBIAN OF THE TWO NONLINEAR EQUATIONS CALL DERP(N.M.V.L.X1,Y1.A.C)
C CALCULATE THE CHANCE IN N AND M C G(2 ) - ( .A(2 ,1 )*C(1 )+A(1 .1 )*C(2 ) ) / (A(2 .1 )*A(1 .2 ) -A(1 .1 )*A(2 2) ) C G ( 1 ) . ( . C ( 2 ) - A ( 2 . 2 ) * G ( 2 ) ) / A ( 1 . 2 ) ^^^
G ( l ) - ( - A ( 2 . 2 ) * C ( l ) + A ( 1 . 2 ) * C ( 2 ) ) / ( A ( 2 . 2 ) * A ( l . l ) - A ( 1 . 2 ) * A ( 2 1)) G ( 2 ) - ( - C ( 2 ) - A ( 2 . 1 ) * G ( l ) ) / A ( 2 . 2 )
PRINT 2 2 , A ( 1 . 1 ) . A ( 1 . 2 ) . A ( 2 . 1 ) . A ( 2 . 2 ) . C ( 1 ) . C ( 2 ) PRINT 22.V.L.N.M.G(1).G(2) PRINT 23
22 FORMAT( 5H C0N-,6E11.4) 23 FORMAT( / )
C CHECK FOR CONVERGENCE TEST-DABS(G(l)/N) IF(TEST.GT.ERLIM)NERS-NERS+1 TEST-DABS(G(2)/M) IF(TEST.GT.ERLIM)NERS-NERS+1 IF(ICT.CT.NITR)GO TO 2000 IF(NERS.NE.O)GO TO 1000 Nl-N Ml-M RETURN
C IF NEWTON'S METHOD DID NOT CONVERGE. INDICATE THRU A PRINT AND RETURN 2000 PRINT 25
25 FORMAT( 'NEWTON METHOD DID NOT CONVERGE IN PARM') RETURN END
C C>i» ************************** ABSTRACT ******************************** C C THIS SUBROUTINE CALCUU TES THE DERIVATIVE OF THE TWO EQUATIONS THAT C RESULT FORM THE SMITH-BRINKLEY MODEL WITH RESPECT TO N AND M THE
104
C DERIVATIVES ARE CALCULATED BY FINITE DIFFERENCE APPROXIMATIONS THE C ANSWERS ARE STORED IN A(I.J). A(I.J) IS THE JACOBIAN 0 ^ ™ ° TWO C NONLINEAR EQUATIONS. C C*************************** NOMENCALTURE ************************^^* C
C A(I.J)- THE JACOBIAN OF THE ITH EQUATION WITH RESPECT TO THE JTH C VARIABLE ( J-1 V; J-2 L) C B(I)- THE VALUE OF THE ITH EQUATION C DELTA- THE FRACTIONAL CHANGE IN V AND L USE TO CALCULATE THE C NUMERICAL DERIVATIVES C F(I)- THE EQUATION VALUE OF THE ITH EQUATION C L.Ll- THE REFLUX LIQUID FLOW RATE (#MOLES/HR) C M.M1,M2- THE NUMBER OF THEORITICAL STAGES IN THE RECTIFYING SECTION C N.N1.N2- THE NUMBER OF THEORITICAL STAGES FOR THE COLUMN C V.Vl- THE VAPOR BOIL-UP RATE FOR THE REBOILER (#MOLES/HR) C X.Xl- THE COMPOSITION OF THE LIGHT COMP IN THE BOTTOMS C Y.Yl- THE COMPOSITION OF THE HEAVY COMP IN THE OVERHEAD C c*--C
FIGURE B.l Splic^of the disciUation column „ich a sidescrea.
APPENDIX C
LISTING OF THE COMPUTER CODE FOR THE APPROXIMATE MODEL
115
116
C*** COMPUTER CODE FOR THE APPROXIMATE •*•• C*** MODEL OF A DISTILLATION COLUMN WITH **** C*** A SIDESTREAM DRAWOFF **•* C*** **** C*** PROGRAMMER RUPAK SINHA **•* C***********************************************************
C******* MAIN PROGRAM ******* C C THIS PROGRAM IS THE APPROXIMATE MODEL FOR A DISTILLATION COLUMN C UlTH A SIDESTREAM DRAWOFF TRAY IN THE STRIPPING SECTION OF THE COLUMN C IT ALSO CALLS THE PROGRAM TO PARAMETERIZE THE COLUMN. C C NOMENCLATURE C F - FEED RATE (MOLES/SEC) C B - BOTTOMS RATE (MOLES/SEC) C G - SIDESTREAM DRAWOFF RATE (MOLES/SEC) C V - BOILUP RATE (MOLES/SEC) C D - DISTILLATE RATE (MOLES/SEC) C R - REFLUX RATIO C L(l) - REFLUX RATE (MOLES/SEC) C L(2) - LIQUID FLOWRATE IN MID SECTION OF COLUMN (MOLES/SEC) C L(3) - LIQUID FLOWRATE IN BOTTOM SECTION OF COLUMN (MOLES/SEC) C TT - ARE TEMPERATURES IN THE COLUMN IN THE DIFFERENT SECTIONS C PP - ARE PRESSURES IN THE COLUMN C FMB - REQUIRED RECOVERY OF THE COMPONENT IN THE BOTTOMS C GMB - REQUIRED RECOVERY OF THE COMPONRNT IN THE SIDESTREAM C DMB - REQUIRED RECOVERY IN THE DISTILLATE C II - NUMBER OF TRAYS IN THE TOP SECTION OF THE COLUMN C Nl - NUMBER OF TRAYS IN THE MIDDLE OF THE COLUMN C Ml - NUMBER OF TRAYS IN THE LOWER SECTION OF THE COLUMN C X - LIQUID COMPOSITION (MOLES) C Y - VAPOR COMPOSITION (MOLES) C C THIS PROCESS USES C2 AND C3 AS THE TWO COMPONENTS
IMPLICIT REAL*8(A-H.0-Z) COMMON /VAR/ F.B.D.G.R.NT.NJ COMMON /VAR1/AA(3).BB1(3).CC(3).DD(3).X(3.3).P(3).T(3).TC(3).PC(3) COMMON /VAR2/FMB.GMB.DMB DIMENSION XX(3).Y(3).Z(3).FX(3).L(3).TT(5).PP(5) REAL *8 K.L.Il.Nl.Ml.IL.IM.NL.NM.ML.MX DO 1 NN - 1.3
C C READ IN ALL INITIAL DATA C
READ(5.14)AA(NN).BBl(NN).CC(NN).DD(NN).TC(NN).PC(NN) 14 F0RMAT(6D12.5) 1 CONTINUE F - 5600./3600. B - 2600.0/3600. V - 2522.0/3600. C - 1000.0/3600 L(l) - 1169 2/3600. L(2) - L(l)-G L(3) - L(2)+F
117
c c c c
c c c c c c
CALCULATE ALL AVARAGE TEMPERATURE AND PRESSURES FOR EACH OF THE THREE SECTKWS
P ( l ) - ( P P ( l ) + P P ( 2 ) ) / 2 . P(2) - (PP(2 )+PP(3 ) ) / 2 . P(3) - ( P P ( 3 ) + P P ( 4 ) ) / 2 . T ( l ) - ( T T ( l ) * T T ( 2 ) ) / 2 . T(2) - (TT(2) -HT(3) ) /2 . T(3) - (TT(3) -HT(4) ) /2 . D - F-G-B R - L ( l ) / D FMB - 0 .8416 GMB - 0 .0827 DMB - 1-FMB-GHB IL - 4 . 9 9 1 8 NL - 4 .986795 ML - 9.992715 II - IL Nl - NL Ml - ML XX(1) - 0 . Y d ) - 0.
CALL SUBROUTINE TO PARAMETERIZE THE PROGRAM INITIALLY
CALL PARM(I1.NI,M1,V,L) CALL SUBROUTINE TO EVALUATE THE RECOVERIES FOR THE SYSTEH
100 CALL E V A L d l . N l . M l . V . L . X X . Y . F F ) CONTINUE
C THIS FUNCTION SUBROUTINE CALCULATES THE FUGACITY COEFICIENT FOR
A COMPONENT FROM THE REDUCED TEMPERATURE. REDUCED PRESSURE. AND THE ACENTRIC FACTOR
ABSTRACT *******************************
C C C C C * * * * * * * * * * * * * * * * * * * * * * * * *
c NOMENCLATURE
118
C I'll- FUGACITY COEFICIENT C PR- THE REDUCED PRESSURE C TR- THE REDUCED TEMPERATURE C W- THE ACENTRIC FACTOR C C-J
c •••***•**••*•••*••••*•*•
FUNCTION PH(TR.PR.W) IMPLICIT REAL*8(A-H.0-Z)
P-(.1445+.073*W)/TR-(.33-.46*W)*TR**(-2)-(.1385+.5*W)*TR**(-3) l-(.0121+.097*W)*TR**(-4)-.0073*W*TR**(-9) PH-10.**(PR*P/2.303) RETURN END
C C************************ ABSRACT ************************************* C
C THIS SUBROUTINE CALCULATES THE NUMBER OF THEORITICAL STAGES FOR C THE COLUMN AND FOR THE STRIPPING SECTION. FILTERED STEADY-STATE DATA C FOR THE REFLUX RATE. THE VAPOR BOIL-UP RATE. FEED RATE. AND THE C COMPOSITON OF THE LIGHT COMPONENT IN THE BOTTOMS AND OVERHEAD ARE C PROVIDED TO THIS SUBROUTINE. THE VALUES OF N AND M ARE FOUND USING A C A NEWTON'S SEARCH TO SATISFY THE SMITH-BRINKLEY MODEL. C C************************ NOMENCLATURE **•*•********•***********••*•**• C
C A(I,J)- THE PARTIAL OF THE ITH EQUATION WITH RESPECT TO THE JTH C UNKNOWN (J-1 IS N; J-2 IS M) C C(I)- THE FUNCTION VALUE OF THE ITH EQUATION C ERLIM- THE RELATIVE ERROR CRITERIA FOR CONVERGENCE OF THE NEWTON'S C SEARCH C G(l)- THE CHANGE IN THE UNKNOWNS CALCULATED BY THE NEWTON'S SEARCH C ICT- AN ITERATION COUNTER C KB(I)- THE K VALUE OF THE ITH COMPONENT FOR THE AREA OF COLUMN BELOW C THE FEED TRAY(I-1 LIGHT COMPONENT: 1-2 HEAVY COMPONENT) C KT(I)- THE K VALUE OF THE ITH COMPONENT FOR THE AREA OF COLUMN ABOVE C THE FEED TRAY (I-l LIGHT COMPONENT; 1-2 HEAVY COMPONENT) C L.Ll- THE REFLUX FLOW RATE (iJIMOLES/HR) C M.Ml- THE NUMBER OF THEORITICAL STAGES BELOW THE FEED TRAY C N.NI- THE TOTAL NUMBER OF THEORITICAL STAGE IN THE COLUMN C NERS- THE NUMBER OF VARIABLE THAT DO NOT MEET THE CONVERGENCE CRITERI C Til- THE BOTTOMS TEMPERATURE (DEC F) C TEST- THE RELATIVE ERROR IN A VARIABLE C TF- THE TEMPERATURE OF THE FEED (DEG F)
C TM- THE AVERAGE TEMPERATURE IN THE STRIPPING SECTION (DEG F) C TN- THE AVERAGE TEMPERATURE IN THE RECTIFYING SECTION (DEG F) C TT- THE TEMPERATURE AT THE TOP OF THE COLUMN (DEG F) C X- MOLE FRACTION OF THE LIGHT COMP IN THE BOTTOMS PRODUCT C Y- MOLE FRACTION OF THE LIGHT COMP IN THE OVERHEAD PRODUCT
C C************************************************************************
C Sl'BROUTINE PARMdl .Nl .Ml .V .L) IMPLICIT REAL*8(A-H.0-Z) DIMENSION A ( 3 . 3 ) . C ( 3 )
119
COMMON /ONE/ D.B.X.Y.TF.TT.TB.P.F.Z.KT.KB COMMON /TWO/ ERLIM.NITR.K1.K2.TAU(2).XINT.YINT.DT.ITYPE REAL*8 I.N,M.KT(2),KB(2).K1(2).K2(2).L(3).GG(3).N1.M1.I1 I-Il N-Nl M-Ml WRITE(6.666)1.N.M
666 FORMAT(6X,'TRAY IN PARM'.3D12.5) C Xl-X C Yl-Y C C ITERATIVELY SOLVE FOR N AND M C
ERLIM - 1.0D-03 NITR - 100 ICT-O
1000 ICT-ICT+1 C CALCULATE THE JACOBIAN OF THE TWO NONLINEAR EQUATIONS
CALL DERPd.N.M.V.L.Xl.Yl.A.C) C CALCULATE THE CHANGE IN N AND M
TEST-DABS(GG(1)/I) IF(TEST.GT.ERLIM)NERS-NERS+1 TEST-DABS(GG(2)/N) IF(TEST.GT.ERLIM)NERS-NERS*1 TEST-DABS(GG(3)/M) IF(TEST.GT.ERLIM)NERS-NERS+1 IF(1CT.GT.NITR)G0 TO 2000 IF(NERS.NE.0)GO TO 1000 Il-I
120
Nl-N MI-M RETURN
C IF NEWTON'S METHOD DID NOT CONVERGE. INDICATE THRU A PRINT AND RETURN 2000 PRINT 25
25 FORMAT( 'NEWTON METHOD DID NOT CONVERGE IN PARM') RETURN END
C C********************;******** ABSTRACT ********************************
C THIS SUBROUTINE CALCULATES THE DERIVATIVE OF THE TWO EQUATIONS THAT C RESULT FORM THE SMITH-BRINKLEY MODEL WITH RESPECT TO N AND M. THE C DERIVATIVES ARE CALCULATED BY FINITE DIFFERENCE APPROXIMATIONS. THE C ANSWERS ARE STORED IN A(I.J). A(I.J) IS THE JACOBIAN OF THE TWO C NONLINEAR EQUATIONS. C C*************************** NOMENCALTURE ***************************** C C A ( I . J ) - THE JACOBIAN OF THE ITH EQUATION WITH RESPECT TO THE JTH C VARIABLE ( J - 1 V; J - 2 L) C B(I)- THE VALUE OF THE ITH EQUATION C DELTA- THE FRACTIONAL CHANGE IN V AND L USE TO CALCULATE THE C NUMERICAL DERIVATIVES C F(I)- THE EQUATION VALUE OF THE ITH EQUATION C L.Ll- THE REFLUX LIQUID FLOW RATE (^MOLES/HR) C H.M1,M2- THE NUMBER OF THEORITICAL STAGES IN THE RECTIFYING SECTION C N.N1.N2- THE NUMBER OF THEORITICAL STAGES FOR THE COLUMN C V.Vl- THE VAPOR BOIL-UP RATE FOR THE REBOILER (<>MOLES/HR) C X.Xl- THE COMPOSITION OF THE LIGHT COMP IN THE BOTTOMS C Y.Yl- THE COMPOSITION OF THE HEAVY COMP IN THE OVERHEAD C (;•*•>•;••>*******•***************•*•*•****•*•*•*****•*****•***•**••****••**•**
C DETERMINE F(I) FOR THE BASE CASE CALL EVALd.N.M.V.L.X.Y.F) B(l)-F(l) B(2) —F(2) B(3)-F(3)
C INCREMENT I I2-I*(1.+DELTA) CALL EVAL(I2.N.M.V.L.X.Y.F)
C DETERMINE PARTIAL DERIVITATIVES NUMERICALLY A(1.1)-(F(1)-B(1))/1/DELTA A(2.1)-(F(2)-B(2))/1/DELTA
121
A(3.1)-(F(3)-B(3))/1/DELTA C INCREMENT N
N2-N*(1.+DELTA) CALL EVAL(I.N2.M.V.L.X.Y.F)
C CALCULATE PARTIAL DERIVITATIVES NUMERICALLY Ad.2)-(F(1).B(1))/N/DELTA A(2.2)-(F(2)-B(2))/N/DELTA A(3.2)-(F(3)-B(3))/N/DELTA
C INCREMENT M M2-M*(1.+DELTA) CALL EVAL(I,N.M2.V.L.X.Y.F) A(1.3)-(F(1)-B(1))/M/DELTA A(2.3)-(F(2)-B(2))/M/DELTA A(3.3)-(F(3)-B(3))/M/DELTA RETURN END SUBROUTINE CONST(K.L.V,I.N.M)
C C THIS SUBROUTINE CALCULATES THE VALUES FOR THE CONSTANTS REQUIERD C IN THE INTERMIDIATE CALCULATIONS FOR THE RECOVERIES. C
IMPLICIT REAL*8(A-H.0-Z) COMMON /VAR/F.B,D.G.R.NT.NJ COMMON /VAR3/PHI.PHIl.ALPHA,EGA.EGAl.GAMMA.GAMMAl,S(3).BETA DIMENSION K(3).L(3) REAL*8 K.L.I.N.M DO 200 II-l.3
C************** CALCULATE K VALUES •*•*••***•**•***** C THIS SUBROUTINE CALCUUVTES THE K-VALUES FOR EACH OF THE COMPONENTS C USING ANTONINES CONSTANTS. C
SUBROUTINE KVAL(K.NJ.J) IMPLICIT REAL*8(A-H.0-Z) COMMON /VAR1/AA(3).BB1(3).CC(3).DD(3).X(3.3).P(3).T(3).TC(3).PC(3) DIMENSION K(3).P0(3).L(3).T1(3).TR1(3).PPC(3).TTC(3).W(3)
REAL*8 K.L C PPC ARE CRITICAL PRESSURES (PSIA) C. TTC - CRITICAL TEMPERATURE (DEC F) C W - ACTIVITY COEFFICIENT C
122
PPC(l) - 709.8 PPC(2) - 617.4 PPC(3) - 550.7 TTC(l)-550.0 W d ) - .1064 TTC(2)- 665.9 W(2)-0.1538