0% found this document useful (0 votes)
257 views

Fall 2019 Che 461 Process Dynamics and Control Computer Modeling Assignment No. 2: Diabatic Continuous Stirred Tank Reactor Simulation

This document provides instructions for a computer modeling assignment to simulate a diabatic continuous stirred tank reactor (CSTR) using MATLAB and Simulink. Students are asked to: 1) Develop a Simulink model to solve the nonlinear and linearized equations describing the CSTR system. 2) Simulate responses to changes in inputs like jacket temperature and compare the nonlinear and linearized results. 3) Submit a report discussing the model, simulation results, and comparing responses to insights provided by the linearized model. The report should follow a specified format and include selected simulation results, transfer functions, and documentation of the MATLAB code.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
257 views

Fall 2019 Che 461 Process Dynamics and Control Computer Modeling Assignment No. 2: Diabatic Continuous Stirred Tank Reactor Simulation

This document provides instructions for a computer modeling assignment to simulate a diabatic continuous stirred tank reactor (CSTR) using MATLAB and Simulink. Students are asked to: 1) Develop a Simulink model to solve the nonlinear and linearized equations describing the CSTR system. 2) Simulate responses to changes in inputs like jacket temperature and compare the nonlinear and linearized results. 3) Submit a report discussing the model, simulation results, and comparing responses to insights provided by the linearized model. The report should follow a specified format and include selected simulation results, transfer functions, and documentation of the MATLAB code.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Fall 2019 ChE 461 Process Dynamics and Control

Computer Modeling Assignment No. 2:


Diabatic Continuous Stirred Tank Reactor Simulation

The objective of this computer modeling exercise is to simulate a jacketed diabatic (i.e., non-
adiabatic) continuous stirred tank reactor (CSTR) and its linearized equivalent using MATLAB
with Simulink. A schematic of the reactor is shown below. The diabatic CSTR problem is treated

Figure 1: Diabatic CSTR schematic.

extensively in Module 9 of Bequette’s text (Process Dynamics: Modeling, Analysis and Simulation);
this material can also be found on the web (the link is provided in the course Canvas website). This
should serve as your initial point of reference as you begin to get acquainted with this problem.
The control strategy requires that jacket temperature Tj be manipulated to keep the concentration
CA of Reagent A at specification, in spite of disturbances arising from the feed temperature and
concentration (Tf and CAf , respectively). Since temperature T can swing significantly during
operation of the reactor, we are also interested in insuring that this process variable remains within
acceptable levels. Based on the use of accounting and conservation principles (as described in
Bequette, Section M9.2) the differential equations describing this system are
dCA F
= (CAf − CA ) − r = f1 (CA , T ) (1)
dt V !
dT F ∆H UA
= (Tf − T ) − r− (T − Tj ) = f2 (CA , T ) (2)
dt V Cp ρ Cp ρV
−∆E
r = ko exp( )CA (3)
RT
All other coefficients in the model can be treated as constant-valued parameters.
A working MATLAB with Simulink model and report describing the CSTR simulation will be
required from each student. The report document, MATLAB with Simulink program files, and any
supporting documentation are due by 11:59 pm on Tuesday, October 22. Please do not leave this
assignment for the last minute; plan your time accordingly to meet this deadline.

1
Your computer model (consisting a MATLAB m-file and associated Simulink .slx file) must meet
the following functional requirements.
1. The nonlinear and linearized state-space equations must be solved using MATLAB with
Simulink R2018b (or higher). A MATLAB-only solution (that does not integrate the dif-
ferential equations using Simulink) will not be accepted.

2. As with the spherical reboiler simulation, the linearized state-space model must be simulated
as well, side-by-side with the nonlinear model equations using a single Simulink file.
3. The program should query the user for step changes (from steady-state conditions) in the
three input variables; one example is a 10 degree increase in the jacket temperature.

>> Enter the change in Tj [0 K]: 10

The program should also query the user for the initial step time and final simulation time.
Two figure windows (one for outputs, one for inputs) and properly labeled transfer functions,
in gain-time constant form, corresponding to the linearized model should appear following
proper execution of the m-file (the transfer functions should be displayed in the command
window). The simulation program should correctly evaluate parameters for three different
reactor cases as summarized in Table 1 below.

Parameter (units) Case 1 Case 2 Case 3


3
F (m /hr) 1 1 1
3
V (m ) 1 1 1
k0 (1/hr) 14,825*3600 9,703*3600 18,194*3600
∆H (kcal/kgmol) -5215 -5960 -8195
∆E (kcal/kgmol) 11,843 11,843 11,843
ρ Cp kcal/(m3 o C) 500 500 500
o
T̄f ( K) 298.15 298.15 298.15
C̄AF (kgmol/m3 ) 10 10 10
3 o
U A (kcal/m C hr) 250 150 750
o
T̄j ( K) 298.15 298.15 298.15
R (kcal/(kgmol o C)) 1.98589 1.98589 1.98589
C̄A (kgmol/m3 ) 7.5709 8.5695 5.5683
T̄ (o K) 315.0402 311.267 327.2041

Table 1: CSTR Simulation Parameters at Steady-State Conditions

An m-file with the various problem parameters (cstrstart 2019.m) has been posted on the course
web site. To assist you in debugging your program, the concentration and temperature responses
to a Tj change of +10 o C is shown in Figure 2. This response is based on the Case 2 reactor
parameters in Table 1. Please note that computing initial steady-states in the output variables
is a nontrivial numerical exercise; initial steady-state values for each case are provided for your
convenience. NOTE: you may freely use the brine-water mixing tank MATLAB-Simulink

2
D.E. Rivera: CA Concentration; Solid: NonLinear, Dashed: Linearized
10

c, kgmol/m3 6

0
0 5 10 15 20 25 30
Time

D.E. Rivera: Temperature; Solid: NonLinear, Dashed: Linearized


400

380

360
T, K

340

320

300
0 5 10 15 20 25 30
Time

Figure 2: Simulation results for a +10 degree Celsius change in jacket temperature Tj , step time
1 hr, Case 2 reactor parameters. The nonlinear results display reactor “ignition” phenomena.

files (posted on the course website), which has many similar features to the diabatic
CSTR problem, to help you complete this assignment.

Report Format and Evaluation. As indicated previously, each student will be expected to submit an
individual report documenting the computer modeling exercise and discussing the results obtained
from executing the simulation under different scenarios. The report is due electronically by 11:59
pm on Tuesday, October 22. The report should be written in a concise, clear, and convincing
manner according to the following general format:

• A cover page with your name and other general information (date, title, etc.) clearly indicated.

• An executive summary (at most one page in length) with focus on the main results, conclusions
and any recommendations,

• A brief introduction that states the purpose of the modeling exercise,

• A discussion section, relying on technical arguments and terminology, that interprets and
compares the responses obtained from the MATLAB/Simulink solution to both the nonlinear
and linearized systems of equations.

• An appendix that includes 1) the text of your m-file and 2) a figure of your Simulink model
file, and 3) the A, B, C, Γ, Du , and Dd matrices corresponding to the linearized model of the

3
system. Please note that many of these matrices can be found in Bequette’s online materials.
Do not place any required figures in the appendix!

Please keep your report simple while meeting the requirements of the assignment. Judiciously use
tables and size your figures to insure that your report is concise yet readable. Do not generate print
screens and simply paste images. Make sure that figures fit within page margins; also, box your
answers clearly (or bold or underline). Keep in mind that the goal of the program is to simulate a
highly nonlinear process system, and to generate a linearized model (with responses) that provides
insights into the system (and as will be seen in CMA 4, will be the basis of a closed-loop feedback
control system). Please include with your assignment report the following:
1. Illustrative step responses for independent changes in each manipulated variable for the base
case parameters (Case 2 in Table 1). For each input, include a realistic, non-trivial change
that shows when the linear model is a valid approximation for this system, and a second change
that highlights process nonlinearity, which can include features such as ignition (i.e., reactor
temperature and conversion increasing very rapidly), extinction (the opposite of ignition) and
limit cycles (sustained oscillations that may take a long time to decay). The magnitude and
direction of each change is at your discretion.
2. Transfer functions computed by MATLAB for Case 2 and your other assigned case (as as-
signed below). Please represent these transfer functions in standard (i.e., gain/time
constant) form and use this information as part of your discussion comparing the various
responses obtained from the computer model.
3. If your last name begins with the letters A-K: Analyze the reactor model using the parameters
for Case 1 in Table 1. Compare your results with those obtained for Case 2 using a specific
input variable (if your first name begins with the letters A-K use Tf ; if it begins with the letters
L-Z use CAf ).
4. If your last name begins with the letters L-Z: Analyze the reactor model using the parameters
for Case 3 in Table 1. Compare your results with those obtained for Case 2 using a specific
input variable (if your first name begins with the letters A-K use CAf ; if it begins with the
letters L-Z use Tf ).
Among the questions that you should answer in the discussion section:
1. How well do the responses agree with physical intuition?
2. How do the linearized and nonlinear model responses compare with each other?
3. How useful are the transfer function expressions in predicting the intrinsic dynamic behavior
of this system (e.g., shape, speed, direction, and final values of the response)?
4. How do the responses change when different initial steady-state conditions are considered
(e.g., Case 1 versus Case 2 parameters in Table 1)?
Make sure your MATLAB and Simulink filenames end with your initials (e.g., cstrDER.m);
likewise, make sure your name appears in the file header and figure titles to identify your results
from those of other students. This assignment is worth 150 points, broken down as follows :

4
Technically correct results: 40 %
Thoroughness of discussion and interpretation of results: 30 %
Organization and report quality: 15 %
Computer program quality (for both the main m-file and Simulink window): 15 %
Organization and report quality refers to aspects of the report which enhance its readability (or
alternatively, make it less readable) for the instructor and teaching assistant. Factors that would
affect computer program quality includes such items as failing to put comments on the .m file, using
hard-coded numerical values in lieu of variable names, applying “bad” Simulink practices, etc.
As with CMA No. 1, you will have to submit your report (including appendices) and your
MATLAB .m and Simulink .slx files as separate files within the one assignment link. Please discuss
any extra credit in your report, but submit separate .m and .slx files for any extra credit work
pursued as well. Any MATLAB w/Simulink file submission formatted as a compressed
folder will lose credit; any submission lacking a report or the MATLAB w/Simulink
files will not be graded.

Extra Credit Opportunities. Pursuing extra credit opportunities is encouraged, but please work
on these only after having completed the required portions of the assignment. Any extra credit
items must be complete and in working order in order to receive credit. Please be sure to submit
electronically and properly label any additional files associated with extra credit. The following
extra credit opportunities are available for this CMA:

1. Include variations in flowrate (F ) as an additional disturbance to the system, and show the
effect of step changes in this variable on both the linear and nonlinear models. You can assume
that the system is under tight level control, so that despite the variation in F , the volume
V in the reactor remains constant. Use a random number generator or some other noise
source block to make this a “noisy” step change, and therefore see the effects of a stochastic
disturbance on the model. Document the lumped parameter model equations resulting from
this additional disturbance, extend the linearization model as necessary, and discuss the results
(up to 30 pts extra credit).

2. Add a “wow” item to the computer model - an enhancement to the MATLAB with Simulink
code that greatly increases the functionality or ease of use of the program beyond the require-
ments listed in this handout. Please note that extra input statements do not count as a wow
item; the wow item must also be original in character. Points awarded for extra credit will
depend upon the intensity of the “wow.” “Wow” items need to be discussed beforehand
with the instructor.

You might also like