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

Process modeling and scale up

The document outlines a course on Process Modeling, Simulation, and Scale-Up, focusing on mathematical modeling and numerical simulation of chemical engineering systems using MATLAB and FORTRAN. It includes course objectives, examples of simulations for gravity-flow tanks and continuous stirred-tank reactors (CSTRs), and provides detailed instructions on writing MATLAB programs for these simulations. The document also discusses the necessary equations, parameters, and graphical representations of the results obtained from the simulations.

Uploaded by

muawiyyanurakira
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Process modeling and scale up

The document outlines a course on Process Modeling, Simulation, and Scale-Up, focusing on mathematical modeling and numerical simulation of chemical engineering systems using MATLAB and FORTRAN. It includes course objectives, examples of simulations for gravity-flow tanks and continuous stirred-tank reactors (CSTRs), and provides detailed instructions on writing MATLAB programs for these simulations. The document also discusses the necessary equations, parameters, and graphical representations of the results obtained from the simulations.

Uploaded by

muawiyyanurakira
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

CHEN 503:

PROCESS MODELING, SIMULATION AND SCALE-UP


Lecture Note

By
Dr A. Abubakar

Department of Chemical Engineering


Ahmadu Bello University, Zaria
1
▪ COURSE OUTLINE
➢ Fundamentals
➢ Examples of mathematical models of chemical
engineering systems
➢ Numerical simulation of chemical engineering
systems using MATLAB and FORTRAN
➢ Scale-up

▪ REFERENCE TEXT BOOKS


➢ W. L. Luyben ‘Process Modeling, Simulation, and
Control for Chemical Engineers’ (Modelling-Ch 2 and
3; Simulation – Ch 4 and 5).
➢ G. Stephanopoulos ‘Chemical Process Control: An
Introduction to Theory and Practice’ (Modelling-Ch 4
and 5; Simulation – Ch 6).
2
COURSE OBJECTIVES
At the end of this course, the students should be able to;
▪ Understand the basic concepts and fundamentals of
mathematical modelling and simulation as it relates to
chemical engineering systems

▪ Have a working knowledge on how to develop models for


any chemical engineering system

▪ Have a working knowledge on how to apply numerical


simulation methods in solving – and analyzing the solution
of – the developed models for the chemical engineering
systems with the aid of FORTRAN and MATLAB.

3
TOPIC 3

NUMERICAL SIMULATION OF
CHEMICAL ENGINEERING
SYSTEMS USING MATLAB

4
3.1 Introduction
▪ Simulation basically involves the determination of the response of output variables
to the change in the input variables.

▪ Since the models of chemical engineering systems consist of both algebraic and
differential equations, they can adequately be simulated using differential
equations solvers in the Matlab software. Some of these solvers are developed
based on the Runge-Kutta numerical simulation method. The most commonly used
solvers for chemical engineering systems are ode45 and ode15s.

▪ In using the solvers, two files must be separately created. The first one is the
function file where the model equations are written. In saving this function file, the
name of the file must be the function name itself. The second one is the run file
where the programme is run and initial steady-state conditions for the differential
equations are inputted. The two files must also be saved in the same folder.

▪ NOTE: Normally only the initial steady-state or nominal values of the dependent
variables in the differential terms of the model to be simulated must be known and
they must be provided as arguments in the ode function in the run file. However, if
nominal values of dependent variables form part of algebraic equation(s) of the
model, such values must also be known and in this case, such nominal values are
provided in the function file.
5
How to Write MATLAB Programme for Model Simulation
Rearrangement of Model Equations
- Making the differential terms the subjects
- Breaking up the multi-variable differential terms

Creation and Saving of Two Files in the Same Folder


- Function file (whose name must be the function name itself)
- Run file

Function File
- Function
- Parameter values
- Forcing functions and or specified variables
- Splitting of states (States are the variables in the differential terms)
- Model equations
- Output

Run File
- Time of simulation (t)
- Steady-state conditions (ssc)
- Ode solver (t and ssc can be directly combined with the Ode solver)
- Result display
6
3.2 Gravity-Flow Tank
Problem description and relevant model equations
We want to simulate the operation of the gravity-flow tank that we considered in
example 1.9 of topic one using Matlab. This is shown in Fig. 3.1.

Fig. 3.1: Gravity-flow tank

The model developed gave us a non linear ordinary differential equation (ODE) as;
𝒅𝒗 𝒉 𝑲𝑭 𝒈𝒄 𝟐
=𝒈 − 𝒗 (3.1)
𝒅𝒕 𝑳 𝝆𝑨𝒑
𝑭
𝒗= (3.2)
𝑨𝒑
where 𝑳 = length of the pipe, 𝑨𝒑 = area of the pipe, 𝑲𝑭 = constant
7
Eq. (3.1) is nonlinear because of the presence of 𝒗𝟐 .
To describe the system completely, the following total continuity equation on the
liquid in the tank is also needed.
𝒅𝒉 (3.3)
𝑨𝑻 = 𝑭𝒐 − 𝑭
𝒅𝒕
𝑨𝑻 = area of the tank
Therefore, combining Eqs. (3.2) and (3.3) gives
𝒅𝒉 𝟏 (3.4)
= 𝑭 − 𝒗𝑨𝒑
𝒅𝒕 𝑨𝑻 𝒐
The physical dimensions, parameter values and initial steady-state (or nominal)
values are given in Table 3.1.

Table 3.1: Gravity-flow tank data

Parameters Forcing function


Pipe: ID = 3 ft Area = 7.06 ft2 Length = 3000 ft 𝐹𝑜 = 35.1 ft3/s

Tank: ID = 12 ft Area = 113 ft2 Height = 7 ft Steady-state conditions


Others: 𝐾𝐹 = 0.0281 Ibf/(ft/s)2 ft 𝑔 = 32.2 ft/s2 ℎത = 4.72 ft

𝑔𝑐 = 32.2 Ibm ft/Ibf s2 𝜌 = 62.52 Ibm/ft3 𝜈ҧ = 4.97 ft/s


8
Problems:
▪ Simulate the gravity-flow tank to determine the variations of height, ℎ with time
for (a) 𝐹𝑜 = 35.1 ft3/s and 1,000 s, (b) 𝐹𝑜 = 35 ft3/s and 1,000s, (c) 𝐹𝑜 = 3.51 ft3/s
and 10,000 s.
▪ In each case, plot ℎ as a function of time.

SOLUTION
The following steps will be followed to solve this problem:
▪ Determination of degree of freedom.
▪ Writing of the MATLAB programme to simulate the system.
Degrees of freedom of the system
❖ The parameters are 𝒈, 𝑳, 𝑲𝑭 , 𝒈𝒄, 𝝆, 𝑨𝒑 and 𝑨𝑻 .
❖ The forcing function or input variable is 𝑭𝒐 .
❖ The dependent variables are 𝝂 and 𝒉.
❖ There are two equations.
❖ Thus, the degree of freedom is zero.

NOTE: In some texts, the forcing functions are considered as dependent or


unknown variables. In that case, the number of unknown variables becomes three
and then the degree of freedom is 3 – 2 = 1. This means that one unknown variable
must still be specified to fix the system.
9
Simulation of the system
▪ Programme
Function file:
function dvhdt = gravitymod(t,X)

% gravitymod -This is a nonlinear model of a gravity flow tank where the


% liquid height in the tank is of interest.
%
% The model has 2 states.
%
% Inputs: t - time in [s].
% X - State; the first state is liquid velocity (ft/s) in
% the outlet line. The second state is height (ft) of
% liquid in the tank.

%------------------------------------------------------------

% Parameter values:
g=32.2; L=3000; gc=32.2; KF=0.0281; rho = 62.52; Ap=7.06; AT=113;

%------------------------------------------------------------

% Forcing function or input variable:


F0=35.1; % Inlet liquid flow rate (ft3/s)

%------------------------------------------------------------ 10
% Splitting the states
v=X(1); % Liquid velocity in the outlet line (ft/s)
h=X(2); % Height of the liquid in the tank (ft)

%------------------------------------------------------------
% THE MODEL

% Force balance
dvdt = g*h./L-KF*gc/(rho*Ap)*v^2;

% Total continuity
dhdt = (F0-v*Ap)/AT;

%------------------------------------------------------------
% Output
dvhdt=[dvdt';dhdt'];

Run file (Using ode45 solver):


clc
clear all
vs=4.97; % Nominal liquid velocity in the outlet line (ft)
hs=4.72; % Nominal liquid height in the tank (ft/s)
[t, X] = ode45('gravitymod', [0:1:1000], [vs; hs]);
plot(t,X(:,2))
xlabel('time (s)')
ylabel('h, ft')
title('Example 3.1')
11
▪ Graphical representation of the results

Fig. 3.2a: Plot of liquid height against time for 𝐹𝑜 = 35.1 ft3/s 12
Fig. 3.2b: Plot of liquid height against time for 𝐹𝑜 = 35 ft3/s 13
Fig. 3.2c: Plot of liquid height against time for 𝐹𝑜 = 3.51 ft3/s 14
3.3 Three CSTRs in Series
Problem description and relevant model equations
We want to simulate the operation of three CSTRs in series that we considered in
section 2.1 of topic two for 5 minutes using Matlab. This is shown in Fig. 3.3.

𝑉2 𝑉3

Fig. 3.3: Series of CSTRs

The developed model for the system consists of three linear ODEs as follows:
𝒅𝑪𝑨𝟏 𝟏 (3.5)
= 𝑪𝑨𝒐 − 𝑪𝑨𝟏 − 𝒌𝑪𝑨𝟏
𝒅𝒕 𝝉
𝒅𝑪𝑨𝟐 𝟏 (3.6)
= 𝑪𝑨𝟏 − 𝑪𝑨𝟐 − 𝒌𝑪𝑨𝟐
𝒅𝒕 𝝉
𝒅𝑪𝑨𝟑 𝟏 (3.7)
= 𝑪𝑨𝟐 − 𝑪𝑨𝟑 − 𝒌𝑪𝑨𝟑
𝒅𝒕 𝝉
15
The steady-state conditions for the system are 𝑪𝑨𝟏(𝒔) = 0.4 kmol/m3, 𝑪𝑨𝟐(𝒔) = 0.2
kmol/m3 and 𝑪𝑨𝟑(𝒔) = 0.1 kmol/m3. The forcing function is 𝑪𝑨𝒐 . We will assume that
at time zero, 𝑪𝑨𝒐 is set 1.8 kmol/m3 and held constant. The time constant, 𝝉 is
equal to 2 min and the value of reaction rate constant, 𝒌 is 0.5 min-1.

Problems:
▪ Simulate the CSTRs in series to determine the variations of exit concentrations
from the three reactors with time.
▪ Plot 𝑪𝑨𝟏 , 𝑪𝑨𝟐 and 𝑪𝑨𝟑 as functions of time.

SOLUTION
The following steps will be followed to solve this problem:
▪ Determination of degree of freedom.
▪ Writing of the MATLAB programme to simulate the system.

Degrees of freedom of the system


❖ The parameters are 𝒌 and 𝝉.
❖ The forcing function or input variable is 𝑪𝑨𝒐 .
❖ The dependent variables whose initial conditions are 𝑪𝑨𝟏 , 𝑪𝑨𝟐 and 𝑪𝑨𝟑 .
❖ There are three equations.
❖ Thus, the degree of freedom is zero.
16
Simulation of the system
▪ Programme
Function file:
function dcdt = cstrseriesmod(t, X)

% cstrseriesmod -This is a linear model of three CSTRs in series where the


% dynamics of the concentration of reactant A is of
% interest
%
% The model has 3 states.
%
% Inputs: t - time in [min].
% X - State; the first state is concentration (kmol/m3) of
% reactant A in reactor 1, the second state is
% concentration (kmol/m3) of reactant A in reactor 2 and
% the third state is concentration (kmol/m3) of reactant
% A in reactor 3.
%------------------------------------------------------------
% Parameter values:
tau=2; k=0.5;

%------------------------------------------------------------
% Forcing function or input variable:
CA0=1.8; % Inlet concentration of reactant A into reactor 1 (kmol/m3)

%------------------------------------------------------------ 17
% Splitting the states
CA1=X(1); % Exit concentration of reactant A from reactor 1 (kmol/m3)
CA2=X(2); % Exit concentration of reactant A from reactor 2 (kmol/m3)
CA3=X(3); % Exit concentration of reactant A from reactor 3 (kmol/m3)

%------------------------------------------------------------

% THE MODEL

% Component continuity in reactor 1


dCA1dt = 1/tau*(CA0-CA1)- k*CA1;

% Component continuity in reactor 2


dCA2dt = 1/tau*(CA1-CA2)- k*CA2;

% Component continuity in reactor 3


dCA3dt = 1/tau*(CA2-CA3)- k*CA3;

%------------------------------------------------------------

% Output
dcdt=[dCA1dt';dCA2dt';dCA3dt'];

18
Run file (Using ode45 solver):
clc
clear all
tspan=[0 5]; % Range of time for simulation
CAs=[0.4 0.2 0.1]; % Nominal exit concs. from the three reactor(kmol/m3)
[t, X] = ode45('cstrseriesmod', tspan, CAs);
plot(t,X(:,1),'+',t,X(:,2),'*',t,X(:,3),'s')
legend('CA1','CA2','CA3')
xlabel('time (min)')
ylabel('Concentration of reactant A, kmol/m3')
title('Example 3.2')

▪ Graphical representation of the results


The dynamics or variations of the concentrations of reactant 𝐴 in the three reactors
with respect to time of the CSTRs are shown in Figs. 3.4 in the next slide.

19
Fig. 3.4: Plot of concentration against time 20
Class Work
Let us reconsider the above three CSTRs in series for a case in which the holdups
and the flow rates are not constant. This condition requires the following controller
equation that represents the hydraulic between reactor holdup and the exit flow rate.
𝑭 = 𝑲𝑽 𝑽 − 𝑽𝒎𝒊𝒏
The additional forcing function, 𝑭𝒐 is set at 600 m3/min and the initial steady-state
values for the holdups are each 300 m3. The minimum holdup (i.e. 𝑽𝒎𝒊𝒏 ) is at a
constant value of 100 m3 for each of the three reactors while the constant 𝑲𝑽 is 2.5
min-1.

21
3.4 Binary Distillation Column
Problem description
We want to simulate the operation of the binary distillation column in Fig. 3.5 for 100
minutes using Matlab.
This system is a slightly modified version of section 2.9 in topic two. The main
differences between the two systems are as follows:

▪ The condenser and reboiler are not included in the number of the stages or trays
in section 2.9 unlike in the current one where the condenser and reboiler are
numbered with the column stages.
▪ In section 2.9 of topic two, the feed condition was not taken into account unlike in
the current one.
▪ There are no level controllers in current system unlike in section 2.9 of topic two.

The important points to be noted in the current system are as follows:


▪ The feed stream is fed as saturated liquid (at its bubble point) onto the feed tray
▪ The overhead vapour is totally condensed in a condenser and flows into the
reflux drum. The content of the drum is assumed to be perfectly mixed. The
liquid in the drum is at its bubble point.
▪ The liquids in the reboiler and in the base of the column are assumed to be
perfectly mixed together and have the same composition.
22
𝑽𝑵𝑻−𝟏 Stage 𝑵𝑻
𝒚𝑵𝑻−𝟏

Stage 𝑵𝑻−𝟏

𝑳𝑵𝑻 , 𝒙𝑫 𝑫, 𝒙𝑫

𝑭, 𝒛𝑭
Feed stage

𝑽𝟏 , 𝒚𝟏 Stage 2

Stage 1

𝑩, 𝒙𝑩

Fig. 3.5: Binary distillation column


23
Other modelling assumptions:
Binary mixture: one feed and two products, constant pressure, constant relative
volatility, equilibrium on all stages, total condenser, constant molar flows (same
vapour flow on all stages), no vapour holdup, linearized liquid hydraulic equation,
but effect of vapour flow ("K2“ effect) is included.
Stage numbering:
The numbering is from the bottom to the top i.e. Reboiler = stage 1, Feed stage =
stage 𝑁𝐹 , Condenser = stage 𝑁𝑇.
Problems:
▪ Simulate the binary distillation column dynamic model to determine the
variations of liquid holdup, 𝑀𝑖 and compositions of light component, 𝑥𝑖 with time.
▪ Simulate the model when the feed rate increases from 1 kmol/min to 1.01
kmol/min, with all other conditions kept constant.
▪ In each scenario, plot 𝑀1, 𝑀𝑁𝑇, 𝑥1 and 𝑥𝑁𝑇 as functions of time.

SOLUTION
The following steps will be followed to solve this problem:
▪ Development of the model for this system.
▪ Specification of the parameters, forcing functions, some unknown variables if the
degree of freedom is not zero, and nominal or initial steady-state conditions.
▪ Writing of the MATLAB programme to simulate the system.
24
Relevant model equations for simulation
Condenser and Reflux Drum, i = 𝑵𝑻 (𝑴𝒊 = 𝑴𝑵𝑻 = 𝑴𝑫 , 𝑳𝒊 = 𝑳𝑵𝑻 = 𝑳𝑻 , 𝒙𝒊 = 𝒙𝑵𝑻 = 𝒙𝑫 )
▪ Total continuity equation:
𝒅𝑴𝒊
= 𝑽𝒊−𝟏 − 𝑳𝒊 − 𝑫 (3.8)
𝒅𝒕
▪ Component continuity equation (more volatile component):
𝒅 𝑴𝒊 𝒙 𝒊
= 𝑽𝒊−𝟏 𝒚𝒊−𝟏 − 𝑳𝒊 𝒙𝒊 − 𝑫𝒙𝑫 (3.9)
𝒅𝒕
Column stages (or trays) excluding condenser, feed stage and reboiler
▪ Total continuity equation on stage i (same as stage n in section 2.9 of topic
two): 𝒅𝑴𝒊
= 𝑳𝒊+𝟏 + 𝑽𝒊−𝟏 − 𝑳𝒊 − 𝑽𝒊 (3.10)
𝒅𝒕
▪ Component continuity equation (more volatile component) on stage i :
𝒅 𝑴𝒊 𝒙 𝒊
= 𝑳𝒊+𝟏 𝒙𝒊+𝟏 + 𝑽𝒊−𝟏 𝒚𝒊−𝟏 − 𝑳𝒊 𝒙𝒊 − 𝑽𝒊 𝒚𝒊 (3.11)
𝒅𝒕
Feed stage, i = 𝑵𝑭
▪ Total continuity equation:
𝒅𝑴𝒊
= 𝑳𝒊+𝟏 + 𝑽𝒊−𝟏 − 𝑳𝒊 − 𝑽𝒊 + 𝑭 (3.12)25
𝒅𝒕
▪ Component continuity equation (more volatile component):
𝒅 𝑴𝒊 𝒙 𝒊
= 𝑳𝒊+𝟏 𝒙𝒊+𝟏 + 𝑽𝒊−𝟏 𝒚𝒊−𝟏 − 𝑳𝒊 𝒙𝒊 − 𝑽𝒊 𝒚𝒊 + 𝑭𝒛𝑭 (3.13)
𝒅𝒕

Reboiler and Column Base, i = 𝟏 (𝑴𝒊 = 𝑴𝟏 = 𝑴𝑩 , 𝑽𝒊 = 𝑽𝟏 = 𝑽𝑩 , 𝒙𝒊 = 𝒙𝟏 = 𝒙𝑩 )


▪ Total continuity equation:
𝒅𝑴𝒊
= 𝑳𝒊+𝟏 − 𝑽𝒊 − 𝑩 (3.14)
𝒅𝒕
▪ Component continuity equation (more volatile component):
𝒅 𝑴𝒊 𝒙𝒊
= 𝑳𝒊+𝟏 𝒙𝒊+𝟏 − 𝑽𝒊 𝒚𝒊 − 𝑩𝒙𝒊 (3.15)
𝒅𝒕

▪ Now, the time rate of change of the composition alone in any stage can be
obtained by applying product rule to the dynamic terms of Eqs. (3.9), (3.11),
(3.13), (3.15) as follows:

𝒅 𝑴𝒊 𝒙 𝒊 𝒅𝑴𝒊
𝒅𝒙𝒊 − 𝒙 𝒊
𝒅𝒕 𝒅𝒕
=
𝒅𝒕 𝑴𝒊
Algebraic equations
▪ The vapour composition 𝒚𝒊 is related to the liquid composition 𝒙𝒊 on the same
stage through the algebraic vapour-liquid equilibrium.
𝜶𝒙𝒊
𝒚𝒊 = (3.16)
𝟏 + 𝜶 − 𝟏 𝒙𝒊

▪ Depending on the feed condition, the vapour flow rate from the feed stage to
the next stages above is given by
𝑽𝑵𝑭 = 𝑽𝑭−𝟏 + 𝟏 − 𝒒𝑭 𝑭
where 𝒒𝑭 is a factor for the feed condition. It is defined as mole fraction of the
liquid in the feed. Therefore, it is equal to 1 for saturated liquid feed.
Therefore, from the assumption of constant molar vapour flows and no
vapour flow dynamics, we have
𝑽𝒊 = 𝑽𝒊−𝟏 𝒊 = 𝟏 𝒕𝒐 𝑵𝑭−𝟏 (3.17a)

𝑽𝒊 = 𝑽𝑭−𝟏 + 𝟏 − 𝒒𝑭 𝑭 𝒊 = 𝑵𝑭 𝒕𝒐 𝑵𝑻−𝟏 (3.17b)

▪ Similarly, depending on the feed condition, the liquid flow rate from the feed
stage to the next stages below is given by
𝑳𝑵𝑭 = 𝑳𝑭+𝟏 + 𝒒𝑭 𝑭
27
In liquid phase, there is a liquid flow dynamics. In addition, there is a dependence
of the liquid flow rate on liquid holdup and vapour flow rate which can be
represented by a linearized hydraulic equation as follows:
𝑳𝒊 = 𝑳𝒔𝒊 + 𝑴𝒊 − 𝑴𝒔𝒊 𝝉𝑳 + 𝑽𝒊−𝟏 − 𝑽𝒔𝒊−𝟏 𝝀 (3.18)

where subscript s denotes the nominal or initial steady state values. 𝝉𝑳 = time
constant, 𝝀 = constant for effect of vapour flow on liquid flow ( i.e. K2-effect).

NOTE: Eq. (3.18) is only applicable to column stages. However, considering the
condition of the feed, the equation needs to be written in two forms: the first one
from stage 2 to 𝑁𝐹 and the second one from stage 𝑁𝐹+1 to 𝑁𝑇−1 .
Degrees of freedom of the system:
❖ The parameters and their values: 𝑵𝑻, 𝜶, 𝝀, 𝝉𝑳 , 𝑵𝑭 and 𝒒𝑭 .
❖ The forcing functions that are to be specified are 𝑭 and 𝒛𝑭 .
❖ The number of dependent variables and the number of equations are presented
in the tables in the next slide. From the tables, the number of unknown variables
is 4𝑵𝑻 +1 while number of equations is 4𝑵𝑻 −3.
❖ Therefore, the degree of freedom = (4𝑵𝑻 +1 ) – (4𝑵𝑻 −3) = 4.

This means that four unknown variables must be specified in addition to the
forcing functions to be able to simulate the system.
NOTE: The forcing functions can be considered as dependent or unknown
variables as it is done in some texts. This will still result to specifying six variables. 28
Number of dependent variables
Source No. of
variables
Liquid and vapour flow compositions in column stages (𝒙𝒊 and 𝒚𝒊 : 𝒊 ≠ 1, 𝑵𝑻 ) 2𝑵𝑻 − 𝟒
Condenser/reflux composition (𝒙𝑫 ) and reboiler compositions (𝒙𝑩 and 𝒚𝑩 ) 3
Column liquid flows (𝑳𝒊 : 𝒊 ≠ 1, 𝑵𝑻 ) 𝑵𝑻 − 𝟐
Condenser/reflux flows (𝑳𝑵𝑻 and 𝑫) 2
Reboiler flows (𝑽∗ and 𝑩) 2
Column liquid holdups (𝑴𝒊 : 𝒊 ≠ 1, 𝑵𝑻) 𝑵𝑻 −2
Condenser/reflux drum holdup (𝑴𝑫 ) and reboiler holdup (𝑴𝑩 ) 2
Total 4𝑵𝑻 +1

*Because of constant molar vapour flow assumption, only one vapour flow is needed

Number of equations
Source Equation No. of
equations
Tray total continuity (3.3) 𝑵𝑻
Tray component continuity (3.4) 𝑵𝑻
Stage equilibrium relations (minus condenser/reflux drum) (3.9) 𝑵𝑻 −1
Hydraulic (minus condenser/reflux drum and reboiler) (3.11) 𝑵𝑻 −2
Total 4𝑵𝑻 −3

29
Specification of relevant data
Parameters
𝑁𝑇 = 41, 𝛼 = 1.5, 𝜆 = 0 (i.e. no vapour effect) , 𝜏𝐿 = 0.063 min, 𝑁𝐹 = 21, 𝑞𝐹 = 1.
Forcing functions
𝐹 = 1.0 kmol/min, 𝑧𝐹 = 0.5
Additional four unknown variables
𝐿𝑁𝑇 = 𝐿 𝑇 = 2.70629 kmol/min, 𝑉1 = 𝑉𝐵 = 3.20629 kmol/min,
𝐷 = 0.5 kmol/min, 𝐵 = 0.5 kmol/min

Nominal or initial steady-state conditions


▪ Nominal liquid holdup and composition (for all stages including reboiler and total
condenser): 𝑀𝑠𝑖 = 0.5 kmol, 𝑥𝑠𝑖 = 0.5.

▪ Nominal values of data specifically for the linearized hydraulic equation. They are
needed only because their nominal values are part of the hydraulic equation):
➢ Nominal liquid holdup above the feed stage, 𝐿𝑠 = 2.70629 kmol/min,
➢ Nominal liquid holdup in feed stage and below: 𝐿𝑠𝑏 = 𝐿𝑠 + 𝑞𝐹 𝐹
➢ Nominal vapour holdup below the feed stage, (only needed if 𝜆 ≠ 0), 𝑉𝑠 =
3.20629 kmol/min,
➢ Nominal vapour holdup in feed and above: 𝑉𝑠𝑡 = 𝑉𝑠 + (1 − 𝑞𝐹 )𝐹
30
Simulation of the system
▪ Programme
Function file:
function xprime = distilmod(t,X)

% distilmod - This is a nonlinear model of a distillation column with


% NT theoretical stages including a reboiler (stage 1) plus a
% total condenser (stage 'NT'). The liquid phase hydraulic
% equation is represented by a simple linear relationship.
% Model assumptions: Two components (binary separation);
% constant relative volatility; no vapor holdup; one feed and
% two products; constant molar flows (same vapor flow on all
% stages); total condenser
%
% The model has 82 states.
%
% Inputs: t - time in [min].
% X - State; the first 41 states are compositions of light
% component A with reboiler/bottom stage as X(1) and
% condenser as X(41). State X(42)is holdup in reboiler/
% bottom stage and X(82) is holdup in condenser.

% Outputs: xprime - vector with time derivative of all the states

%------------------------------------------------------------
31
% Parameter Values:
% Number of stages (including reboiler and total condenser):
NT=41;
% Location of feed stage (stages are counted from the bottom):
NF=21;
% Relative volatility
alpha=1.5;
% Fraction of liquid in feed
qF =1.0;
% Time constant for liquid dynamics (min)
taul=0.063;
% Effect of vapor flow on liquid flow ("K2-effect")
lambda=0;
%------------------------------------------------------------
% Forcing functions and Inputs or Specified Variables
F=1.0; % Feed flow rate
zF=0.5; % Feed composition
LT=2.70629; % Reflux
VB=3.20629; % Boilup
D=0.5; % Distillate
B=0.5; % Bottoms
%------------------------------------------------------------
% Nominal or Initial Steady-State Conditions (They are needed in
% function file only for the linearized hydraulic equation).

% Nominal liquid holdups: (They are also given as arguments of the ode
% function in the run file since they are in the differential
% terms of the differential equations):
32
Ms(1)=0.5; % Nominal reboiler holdup (kmol)
i=2:NT-1; Ms(i)=0.5*ones(1,NT-2);% Nominal stage (tray) holdups (kmol)
Ms(NT)=0.5; % Nominal condenser holdup (kmol)
% Nominal liquid and vapour flow rates for linearized hydraulic and
% differential equations (does not apply to reboiler and condenser):
Ls=2.70629; % Nominal liquid flow above the feed stage
Lsb=L0 + qF*F; % Nominal liquid flow in feed stage and below feed
Vs=3.20629; % Nominal vapor flow below the feed stage
Vst=Vs+(1-qF)*F; % Nominal vapor flow in feed stage and above
%------------------------------------------------------------
% Splitting the States
x=X(1:NT)'; % Liquid composition from bottom to top
M=X(NT+1:2*NT)'; % Liquid hold up from bottom to top

%------------------------------------------------------------
% THE MODEL

% Vapor-liquid equilibria
i=1:NT-1; y(i)=alpha*x(i)./(1+(alpha-1)*x(i));

% Vapor flows assuming constant molar flows


i=1:NT-1; V(i)=VB*ones(1,NT-1);
i=NF:NT-1; V(i)=V(i) + (1-qF)*F;
% Liquid flows considering the linearized hydraulics.
L(1)=B;
i=2:NF; L(i) = Lsb + (M(i)-Ms(i))./taul + lambda.*(V(i-1)-Vs);
i=NF+1:NT-1; L(i) = Ls + (M(i)-Ms(i))./taul + lambda.*(V(i-1)-Vst);
L(NT)=LT;
33
% Time derivatives from material balances for
% 1) total holdup and 2) component holdup

% Column
i=2:NT-1;
dMdt(i) = L(i+1) - L(i) + V(i-1) - V(i);
dMxdt(i)= L(i+1).*x(i+1) - L(i).*x(i) + V(i-1).*y(i-1) - V(i).*y(i);

% Correction for feed at the feed stage


% The feed is assumed to be mixed into the feed stage
dMdt(NF) = dMdt(NF) + F;
dMxdt(NF)= dMxdt(NF) + F*zF;

% Reboiler (assumed to be an equilibrium stage)


dMdt(1) = L(2) - V(1) - B;
dMxdt(1)= L(2)*x(2) - V(1)*y(1) - B*x(1);

% Total condenser (no equilibrium stage)


dMdt(NT) = V(NT-1) - LT - D;
dMxdt(NT)= V(NT-1)*y(NT-1) - LT*x(NT) - D*x(NT);

% Computing the derivative for the mole fractions from d(Mx) = x dM + M dx


i=1:NT;
dxdt(i) = (dMxdt(i) - x(i).*dMdt(i) )./M(i);

%------------------------------------------------------------
% Output
xprime=[dxdt';dMdt'];
34
Run file (Using ode15s solver):
clc
clear all
[t,X]=ode15s('distilmod',[0:5:200],0.5*ones(1,82));
plot(t,X(:,42),'+',t,X(:,82),'*',t,X(:,1),'s',t,X(:,41))
legend('M1','MNT','x1', 'xNT')
xlabel('time (s)')
ylabel('Liquid holdup (kmol) and composition')
title('Example 3.3a')

▪ Graphical representation of the results


The dynamics or variations of the liquid holdup and composition with respect to
time of the binary distillation are shown in Figs. 3.6 and 3.7 in the next slide.
It can be seen that there is not change in the liquid holdup when the feed flow rate
is 1.0 kmol/min. The liquid holdups in stages 1 and 𝑁𝑇 remain at 0.5 kmol through
the whole range of time. However, when the feed flow rate is increased to 1.01
kmol/min, there is a dynamics in the liquid holdup in stage 1 (i.e. reboiler).
Meanwhile, the liquid composition in stage 𝑁𝑇 (i.e. condenser/reflux drum)
increased towards 1 as the time increased while the reverse is the case in stage 1
(i.e. reboiler).

35
Fig. 3.6: Plot when the feed is 1.0 kmol/min 36
Fig. 3.7: Plot when the feed is 1.01 kmol/min 37

You might also like