0% found this document useful (0 votes)
7 views2 pages

Coding Assignments.

Uploaded by

adityamahaldar
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)
7 views2 pages

Coding Assignments.

Uploaded by

adityamahaldar
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/ 2

CL 329 (S2), Autumn 2024

Coding Assignment

Due on: 21st Ocrober, 2024 by 11:59 pm


No credits will be given for plots without clear axis label, ticks, and legends.
Feel free to use any expression derived in class with proper reference to slides
If malpractice is found, no credit will be given for the whole assignment.
This is a group assignment. Please see the attached excel file to know your group.
One of you upload the report of your group as a single PDF in Moodle that contains the written
part of the problems, codes and plots.

Consider a continuous well-mixed unstaged absorption tank of volume V depicted in Fig. 1 used to eliminate
a pollutant A from a gaseous effluent stream. A liquid with molar flow rate F without any A passes through
the tank to absorb A from a gaseous stream with the molar flow rate G with inlet mole fraction yA,i . There is
no mass transfer resistance within individual phases and the equilibrium mole fraction in both the bulk phases
follows a cubic relationship (i.e yA = k eq x3A ) for the relevant regime of operation. The volume of A in both the
phases are negligible. The molar densities of both the bulk phases (i.e. ρL , ρG ) remain constant throughout
the operation. The liquid hold up in the tank is kept constant and the gaseous hold up is negligible in the
tank. (i.e. VG ≈ 0,VL = const. ≈ V ). In steady state, the liquid and gas flow rate are 1 mol/min and 0.5
mol/min. and inlet mol fraction in the gas phase is 0.4. The density of the liquid phase is 0.02 mol/l. Volume
of the reactor is 10 l. keq = 80. You would like to maintain the mole fraction of A in the outlet stream at the
steady state value. You have an instrument to measure the concentration of A in the gaseous stream as well
as a valve to control the flow rate of the liquid feed. You would be using a feedback controller.

Figure 1: An absorption tank

1. Write down the appropriate conservation and constitutive equations to develop the process model in
absence of a control loop. Find the realistic steady state of the process by solving the non-linear
equation numerically.

2. Identify the manipulated and disturbance variables, linearize the equations and Derive the respective
kd , kp and τp from the respective transfer functions considering yA to be the output.

3. In this part, you have to numerically solve the dynamic equations in absence of a controller for a step
change of yAi with magnitude P from the steady state obtained in previous part (Hint: Use ode45) .

Write a function that takes P as an input, and computes and compares the non-linear solution with
the solution from the transfer function approach by plotting them in the same axis.

1
4. Attach the output plots for P =0.1 and P =0.4 to your report.

5. Now, consider you are using a PI controller with gain Kc , and time constant τl for this specific control
loop. Write down the dynamics of the output as a function of time in response to a step change of yA i

with magnitude P . Consider Gf = Gm = 1

6. Next, you will be implementing the PI controller numerically. It might be tempting to implement the PI
controller by an Euler integrator. But Euler integration with a constant step size may lead to numerical
instability for some value of the parameters. However ODE solver like ode45 takes care of this problem
using adaptive timesteps. Specially in this problem we don’t want to confuse between the controller
instability and numerical instability. ode45 requires you to Write down a system of ODEs that you
would solve to observe the response of this controller. Write down these equations.

7. Justify what’s the sign of the Kc .

8. Numerically implement the controller using ode45. Specifically, write down a function that takes P ,
Kc and τl as inputs and computes the controlled response of yA (t) from the numerical implementation
as well as from the transfer function approach and plots them in the same axis.

9. Attach the output plots for P =0.1 and P =0.4 and magnitudes of {Kc , τl } = {10, 0.2}, {100, 0.02}, {200, 0.2},
{650, 0.2} . kc and τl are in units of mol/min and min respectively. There will be total 4*2=8 plots.

10. Identify if any of the solution are unstable from linear or non-linear approach. Show if the respective
system are unstable analyzing the characteristic equation.

You might also like