ManTech Lab Manual 2019

Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

Winter 2019 PROCESS CONTROL LAB MANUAL

Table of Contents
Introduction to UniSim ........................................................... 2
Reactions and Case Studies .................................................... 6
Reaction and Separation ...................................................... 13
Production of Ethyl Chloride................................................. 19
UniSim Heat Exchanger Calculations .................................... 25
Dynamic Simulation of a Tank Separator System ................. 27
Mixing Dynamics................................................................... 32

1
Winter 2019 PROCESS CONTROL LAB MANUAL

Introduction to UniSim
In our first lab we will seek to get acquainted with our process simulator, UniSim R440 from
Honeywell. The various steps to using this simulator are summarised as follows:
 Setting up the Basis Environment
o Creating the component list
o Choosing the fluid package
o Adding reactions
 Creating the Process Flowsheet
o Adding and configuring process streams
o Adding and configuring process equipment
 Presenting output from the process

In today’s work we will create a feed stream of a 50/50 mixture of water and acetone, we will
pass it into a separator, we will look at the composition and flow rates of the ensuing vapour
and liquid streams, and we will ensure that material balance conditions are met by our
simulator.

1. Getting Started
To log on to the PC’s in room 116 you should use our regular login and password.
The programme we use should have a shortcut on the desktop that looks a little like
this:

You can also find it under Start, All Programs, Honeywell, Unisim Design R440. Once the
programme opens, click on File, New, Case

2. Basis Environment
The first thing that opens up is a dialog box for the Simulation Basis Manager

Click Add and then add water and acetone to the components list. Using the Match
search box helps a lot here.

2
Winter 2019 PROCESS CONTROL LAB MANUAL

Close the Component List View.


Click on the Fluid Package Tab and then Add and choose the NRTL package.

Check on the Binary Coefficients tab that the two interaction parameters have been
successfully calculated (they should be in red type).
In this simulation we won’t deal with any reactions, but normally we would also be
visiting the Rxns tab to add reactions to our fluid package.
Close the Fluid Package dialog box.

3. Creating the Process Flowsheet


From the Simulation Basis Manager dialog box, click on the Enter Simulation
Environment… button in the lower right corner. This opens up a new screen called
PFD Case (Main) and also a menu dialog box with units and streams.
From this menu, click on the Separator and drop it into the main window.

3
Winter 2019 PROCESS CONTROL LAB MANUAL

Double click on the new separator vessel, V-100, to enter its dialog box
Choose names for the Inlet, Vapour, and Liquid streams that will attach to this unit.

Because they don’t already exist, these streams will be automatically generated by
the programme, you might even see them pop up on the main PFD screen. Note that
we could have created them separately by clicking on the blue arrow in the Case
(Main) menu list.
Now close the V-100 dialog box.
Configure the conditions of the Feed stream by double clicking on it. Choose its
temperature to be 65ºC, its pressure to be 101kPa, and its molar flow rate to be
100kgmol/hr. Click on the Composition option from the Worksheet list and enter 0.5
for the mole fractions of both water and acetone.
p

Close the Feed stream dialog box. Notice that the icons for all three streams have
now turned from light to dark blue. This is because they have been solved.

4
Winter 2019 PROCESS CONTROL LAB MANUAL

4. Process Simulator Output


Output from the simulator can consist of tables, graphs, calculations, etc. For today’s
work we will content ourselves with the flow rates and compositions of the three
process streams so that we can verify that material balance has been observed by
our simulation.
From the main window, click on the Workbook icon on the toolbar (circled in red in
the screenshot below). Then click on the Workbook text on the upped toolbar, then
Setup.

From the Setup dialog box, make sure the workbook tab Stream is clicked, then from
the variables area click Add then choose Master Comp Molar Flow as the variable
and then H2O and acetone in turn. Click OK, then close the Setup dialog box. Note
the two new rows in the workbook.

Examine the output from the workbook and verify that material balance is good for
total molar flow, and for each component molar flow fraction.

5. Report
Your report will consist of:
 A screenshot of your PFD (2 marks)
 A screenshot of the workbook (2 marks)
 The material balance calculations (2x3 marks)

Submit your report over moodle at:


https://elearning.it-tallaght.ie/mod/turnitintool/view.php?id=288820

5
Week Two PROCESS CONTROL - 02 REACTIONS & CASE STUDIES

Reactions and Case Studies


In our second lab we will further explore the capabilities of process simulators. We will set up
a reaction in a reactor and we will then investigate the influence of process parameters such
as temperature and pressure on the conversion ratio of the reaction.

The reaction we will use is the production of methanol from carbon dioxide and hydrogen.
The reaction is:
CO2 + 3H2  CH3OH + H2O
This is a reversible reaction with different reaction kinetics in the forward and reverse
directions.

A similar same set of procedures will be followed as in last week’s lab. They are:
 Setting up the Basis Environment
o Creating the component list
o Choosing the fluid package
o Adding reactions
 Creating the Process Flowsheet
o Adding and configuring process streams
o Adding and configuring process equipment
 Presenting output from the process

6. Getting Started
To log on to the PC’s in room 116 you should use our regular login and password.
The programme we use should have a shortcut on the desktop that looks a little like
this:

You can also find it under Start, All Programs, Honeywell, Unisim Design R440. Once
the programme opens, click on File, New, Case

7. Basis Environment
The first thing that opens up is a dialog box for the Simulation Basis Manager

Click Add and then add methanol, water, hydrogen, and carbon dioxide to the
components list. Using the Match search box helps a lot here.

Close the Component List View.


Click on the Fluid Package Tab and then Add and choose the SRK package.

Check on the Binary Coefficients tab that all the interaction parameters have been
successfully calculated (they should be in red type).

6
Week Two PROCESS CONTROL - 02 REACTIONS & CASE STUDIES

8. Setting up the Reaction:


Click on the Reactions tab of the Simulation Basis Manager.

Click on Add Rxn. Choose a Kinetic Reaction and then press the Add Reaction
button

Fill out the Stoichiometry tab as shown above. Note that the stoichiometry
coefficients mirror the reaction equation shown above. Note that minus values (e.g. -
3 for H2) indicate that the agent is consumed in the forward order of the reaction.
Also note that the balance error should be 0.000. Depending on the version of
UniSim, you may have to input the Fwd Order and Rev Order columns above by
hand, in which case they will be in blue rather than red. Fill out the Basis and
Parameters tabs as shown below.

7
Week Two PROCESS CONTROL - 02 REACTIONS & CASE STUDIES

Once this is done you can close the Kinetic Reactions window. Then you must press
Add to FP on the Reactions tab of the Simulation Basis Manager (this is shown in an
image above).

9. Creating the Process Flowsheet


From the Simulation Basis Manager dialog box, click on the Enter Simulation
Environment… button in the lower right corner. This opens up a new screen called
PFD Case (Main) and also a menu dialog box with units and streams.

From this menu, click on the CSTR ( ) and drop it into the main window.

Double click on the new CSTR, CSTR-100, to enter its dialog box. Configure it as
shown below. Note that material and energy streams will be made automatically for
you on the PFD.

On the Reactions tab, configure as shown below:

8
Week Two PROCESS CONTROL - 02 REACTIONS & CASE STUDIES

Go to the Dynamics tab. Set the diameter and height of the vessel as below.

You can now close the CSTR-100 – Global Rxn Set window.

The PFD should now look something like this:

9
Week Two PROCESS CONTROL - 02 REACTIONS & CASE STUDIES

Open the Workbook ( ) from the toolbar. Use Set Up like we did last week to add the
Comp Mole Frac for the four components. Configure the workbook as shown below,
remember you just add the parameters in blue, those in black are calculated.

Now are process is solved, note that there is a certain amount of methanol in the
product stream so the reaction is working. If you double click on the CSTR again and
look at its Reactions, Results tab you’ll see the amount of conversion we are
achieving.

10
Week Two PROCESS CONTROL - 02 REACTIONS & CASE STUDIES

5. Case Studies
UniSim lets examine how the process will change as we alter some parameters of
the system. As a first instance we’ll see how the conversion rate in the reactor (the
Act % Cnv.) above changes as the reactor volume changes. This kind of examination
is called a Case Study.
1. Click on Tools, Databook
2. Insert the variables Reactor Feed Pressure and CSTR Actual % Conversion.

On the Case Studies tab Add a new case study and choose the Reactor Feed Pressure
as the independent variable and the CSTR Rxn – Actual % Cnv as the dependent
variables as shown below

Click on View to see the Case Study and fill it out as below

11
Week Two PROCESS CONTROL - 02 REACTIONS & CASE STUDIES

Now click Start and when it finishes running click Results. You should see a graph akin to
the one below. Note how these results are consistent with Le Chatelier’s Principle.

You are also asked to examine two other parameters that influence Actual % Conversion
and produce Case Studies for them.

6. Report
Your report will consist of:
 A screenshot of your PFD (1 marks)
 A screenshot of the workbook (1 marks)
 Screenshots of your Case Studies (2x3 marks)
 Explanation of the principle behind your case studies (e.g. for the first one it is
Le Chatelier’s Principle (2 marks)

12
Week Three PROCESS CONTROL - 03 REACTION AND SEPARATION

Reaction and Separation


This lab won’t present too much new material, it will mostly serve to reinforce the learning
outcomes from the first two labs and also give less hand-holding. To remind you, the skills
we’ve developed so far are:
 Constructing the component database
 Configuring a reaction
 Setting up a PFD
 Inputting the required parameters into the workbook
 Displaying the results of the simulation

In today’s work we will have two feed streams, water and propylene oxide. We will mix them
together and feed to a reactor. Here the reaction: H 2 O  C 3 H 6 O  C 3 H 8 O2 takes place,
producing propylene glycol. We’ll be setting up a PFD something like this:

10. Getting Started


As before, to log on to the PC’s and launch a new case of UniSim Design R400.

11. Component Database


In the Simulation Basis Manager add water, propylene oxide and propylene glycol to
the components list.

Close the Component List View.

13
Week Three PROCESS CONTROL - 03 REACTION AND SEPARATION

Click on the Fluid Package Tab and then Add and choose the relevant fluid package.
The flowchart below should help you choose the correct one, bearing in mind that we
don’t have gasses, electrolytes, and that the Binary Interaction Parameters are not all
known.

Classify components in your process


Gasses
Non-polar
Associating
Solvating
Electrolyte

yes
All gasses, or
Peng-Robinson, SRK
non-polar?

No
yes

Electrolytes? NRTL, PItzer, or Bromley

No yes
No
BIP’s all NRTL, UNIQUAC, FH,
Any gasses? known? Wilson, or VanLaar

No
yes
UNIQUAC

yes
Any polymers? SAFT, ESD

No
yes
Henry’s Law
Pressure <
106Pa?

No

ESD, SAFT, MHV2,


Wong-Sandler

The connection between temperature and pressure will depend not only on what
chemicals are present but also on how they mix together. For this we need the binary
reaction coefficients.
Click Binary Coeffs. To complete the table click on Unknowns Only, making sure the
radio button UNIFAC VLE is selected

14
Week Three PROCESS CONTROL - 03 REACTION AND SEPARATION

Next we define the reaction between our components.


Return to the Simulation Basis Manager and click on the Reactions tab.
Click the ADD RXN button, the Reactions pop-up will appear. Choose Kinetic by
double clicking and the Kinetic Reactions pop-up will appear.
Choose the three components using the drop down lists from the Components
column of the table. Input their stoichoimetries as -1 for water and propOxide (-1
because they are consumed in the reaction) and +1 for propGlycol. Note the balance
error should be 0 (reaction is materially balanced) and the reaction heat should be
negative, indicating an exothermic reaction. Make sure the Fwd Order and Rev Order
boxes are empty, by deleting the entries if necessary.

Next, select the Basis tab of the Kinetic Reactions pop-up and change the Base
Component from H2O to PropOxide and also change the Rxn Phase to Combined
Liquid. Change the Basis Units to lbmol/ft3 and the rate units to lbmol/ft3-hr.
Then click on the Parameters tab to input the Arrhenius parameters for the reaction.
Type in 1.7e13 for the forward A parameter and 75362 for forward parameter E.
There is no reverse reaction

15
Week Three PROCESS CONTROL - 03 REACTION AND SEPARATION

The status indicator at the bottom of the pop-up changes from Not Ready to Ready.
Close the two reactions windows
On the Simulation Basis Manager, click Add to FP then Add Set to Fluid Package

12. Creating the Process Flowsheet


From the Simulation Basis Manager dialog box, click on the Enter Simulation
Environment… button in the lower right corner. This opens up a new screen called
PFD Case (Main) and also a menu dialog box with units and streams.
From this menu, click on a Mixer, CSTR, Heater, and a Separator.

Double click on the MIX-100 and type in the following three streams as connections.

Note that these streams pop into the PFD as they are created on the MIXER
dialogue box.
Repeat the procedure for the CSTR, the Heater, and the Separator.

16
Week Three PROCESS CONTROL - 03 REACTION AND SEPARATION

We need to specify the parameters of the two feed streams, their temperatures,
pressures, flow rates, and compositions.

The parameters in blue type are entered by the user, those in black are calculated.
The Comp Mole Fractions are added to the work book using the workbook, setup
options from the toolbar as we have done before.

Next we need to configure the reactor. It needs to be told the reaction that we are
using in it. Double click on it, go to the reactions tab, and add the reaction we created
earlier. Also, on the dynamics tab specify the reactor volume to be 8m3 and the liquid
fill to be 85%. The reactor needs this to be able to calculate the residence time in the
reactor and thus the reaction extent.

Lastly we need to configure the heater. We’ll do this by specifying the heater out
stream by stipulating its temperature and pressure. We’ll make it isobaric but let it
warm the output stream to 150oC.

17
Week Three PROCESS CONTROL - 03 REACTION AND SEPARATION

At this point the entire PFD should be solved.

13. Process Simulator Output


Like last week, we will verify the material balance of the simulation. This is
complicated because of the reaction.
From the main window, click on the Workbook icon on the toolbar.

Examine the output from the workbook and verify that material balance is good for
total molar flow, and for each component molar flow fraction. Also, do a material
balance for the mixer, the reactor, and the separator. Calculate the conversion and
the yield for the reactor.

14. Report
Your report will consist of:
 A screenshot of your PFD (1 marks)
 A screenshot of the workbook (1 marks)
 The material balance calculations (0.75x8 marks)
There are eight of these:
i) Total molar balance around the mixer
ii) Component balance on water around the mixer
iii) Component balance on oxide around the mixer
iv) Total mass balance around the CSTR
v) Component balance on glycol around the separator
vi) Component balance on water around the separator
vii) Total molar balance around the separator
viii) Total mass balance around the entire process
 Conversion and yield calculations (2 marks)
Calculate the conversion rate on water in the reactor. Because there are no
competing reactions, this will also equal the yield.

18
Week Four 04 RECYCLE & PROFIT

Production of Ethyl Chloride


Introduction:
One of the routes to produce ethyl chloride is by the gas phase reaction of HCl with ethylene:
C2 H 4  HCl  C2 H 5Cl
The PFD for the process is shown below:

Since the reaction only achieves 90% conversion the unreacted components are separated from the
ethyl chloride and recycled.
The process is operated at 25oC, atmospheric pressure (100kPa) and pressure drops are ignored.
To prevent the accumulation of interts (N2) in the system 10kgmol/hr is purged from the system. We
want to investigate the effect of the flow rate of the purge stream on the recycle rate and the feed
to the reactor.

Initial Setup:
1. Start a new case in UniSim
2. Select ethylene, HCl, ethyl chloride, and nitrogen as components.
3. Choose the correct fluid package bearing in mind that everything here is gas phase.
4. Check the binary coefficients, (should be mostly 0).

Setting up the Reaction:


In the simulation basis manager, click the reactions tab, click Add Reaction, then choose conversion
reaction. Enter the stoichiometry for the reaction (remember, -1 for consumed in reaction, +1 for
produced). On the Basis tab enter Ethylene for the base component, Overall for the Rxn Phase, and
90 for C0. Leave C1 and C2 blank, we are not considering any temperature dependence for this
reaction. Don’t forget to add the reaction to the fluid package.

19
Week Four 04 RECYCLE & PROFIT

Setting up the PFD:


Set up the PFD as shown below. For the Splitter, click on Design then Splits and make sure all the
Ethyl Chloride goes to product and everything else goes to For Recycling. Make sure the very last
thing you do to complete the PFD is to connect the Recycle stream into the Mixer. Set the flow
rate in the purge stream to be 13kgmol/hr.

general reactor, conversion.


You’ll need to add the
RCY-1 in responsible for producing a consistent recycle stream, for converging the set
reaction process
on the
simulation. To do this successfully we will increase the number of iterations
appropriate(the
from 10 tab default) to
100. Click on RCY-1, choose the Parameters, Numerical sheet and change the Maximum Iterations to
100

20
Week Four 04 RECYCLE & PROFIT

1. As a check, the worksheet should look as follows:

Case Studies, Effect of Flow Rate of Purge on Process:


|UniSim has a handy way of examining dependencies. We’re going to look at the effect of the flow
rate of the purge stream.
1. Click on Tools, Databook.
2. In the Variables tab choose the following variables:
a. purge – Molar Flow
b. recycle1 – mass flow
c. mixer out – Phase Component Mole Fraction (Overall-Nitrogen)
3. On the Case Studies tab Add a new case study and choose the purge stream as the
independent variable and the mixer out and recycle1 as the dependent variables as shown
below

4. Click View to enter the Case Studies Set-Up screen and fill it out as above:

21
Week Four 04 RECYCLE & PROFIT

5. Now click Start and the Results to get the required graph, something like below. Interpret
your results in terms of the efficiency of using the input ingredients versus the problem of
build-up of inerts in the process.

Profit Calculations
UniSim also lets us calculate the financial gain from this process. It contains an internal spreadsheet
into which functions can be entered, featuring variables from the Workbook. In this way we can
figure out the profit made from a given size of purge stream.
The purge stream wastes some of our reactants, so we want it to be small. However if the purge
stream is too small the reactor will become unfeasibly large to accommodate all the N2 drifting
around the system.
To set up the Spreadsheet, drag a Spreadsheet from the Objects Palette anywhere onto the PFD (it
doesn’t connect to anything).
Type in the entries as shown below.

22
Week Four 04 RECYCLE & PROFIT

Right click in cell b1, chose Import Variables, FEED, Comp Mass Flow, HCl. Do the same for cells b2,
b3, and b5 with the appropriate choice of variable. It should give you a spreadsheet as follows:

We want to calculate the profit based on the formula:


Profit = 330*24*[2.5*product-(1.5ethylene + HCl)*Feed]
– 0.1[500*(330*24*ReactorIn/1000)0.6]
The raw cost of ethylene is 1.5x10-3 units per kg, that of HCl is 1.0x10-3 units per kg, and the sale
price of Ethyl Chloride is 2.5x10-3 units per kg. The last term accounts for the price of the reactor.
To this end, in the spreadsheet tab enter the following data (note, the formulae are shown below in
the formulas tab, but you must enter them in the spreadsheet tab):

23
Week Four 04 RECYCLE & PROFIT

Cell d5 gives us the profit.


Adjust the purge stream molar flow rate between 5kgmol/hr and 15 kgmol/hr and examine the
profit recorded. Plot a graph of purge stream molar flow and profit. If you are clever you’ll do this
using the Case Studies Tool (you might have to knock off the two other dependent variables first).

Mass Balance
Do a mass balance on the Splitter by looking at the streams coming in and leaving this unit. Do the
mass balance on the total mass flow and also on each component molar flow.

Write-Up
Include:

 copy of PFD (1 mark)


 copy of workbook (1 mark)
 case studies curves (2 marks)
 graph of profit versus purge flow (2 marks)
 purge flow rate value for optimal profit (1 marks)
 material balance around splitter (2 marks)
 conclusions (1 mark)

24
Week Five 05 HEAT EXCHANGERS CALCULATIONS

UniSim Heat Exchanger Calculations


Problem 1
 Set up a fluid package with H2O and benzene. Use the UNIQUAC property package.
 Set up a heat exchanger with four material streams. Call them tube in/out and shell
in/out.

 Set the compositions of both tube in and shell in to be 100% water. Set their
temperatures to be tube in = 25oC and shell in = 90oC. Set the flow rate of tube in to
be 9000kg/hr. Set their pressures to be 300kPa (tubes) and 200kPa (shell).
 Set the temperatures of tube out and shell out to be 40oC and 55oC respectively.
 Double click on the heat exchanger and connect the four streams to the appropriate
inlets. On the Parameters page set the Delta P’s (pressure drops) to 30kPa.
 To work correctly, we must let UniSim adjust the UA value. On the Design, Specs
page of the Heat Exchanger uncheck the UA active box.

We have now specified seven of the nine parameters a heat exchanger needs, and this is
enough to solve it uniquely. It’s smart enough to figure out the composition of the outlet
streams, and to calculate the flow rate through the shell and the UA value for the heat
exchanger.
Do these calculations by hand and see if your results agree with UniSim.
i) calculate the shell side flow rate by conservation of energy (mscsΔTs = mtctΔTt).
ii) calculate the LMTD using the four temperatures
iii) divide the LMTD by the FT factor on the performance details page (this takes
account of the fact that the exchanger is a 2-1 pass and so is neither counter nor
parallel flow.
iv) Calculate UA using q = UA ΔT where ΔT is the LMTD, assume counter flow.
You can check on the LMTD from UniSim from the Performance, Specs tab of the heat
exchanger. Note that because this is a 1-2 heat exchanger we don’t have a simple counter
flow but this is corrected by an Ft factor; LMTDactual = Ft x LMTD.

25
Week Five 05 HEAT EXCHANGERS CALCULATIONS

For a 1-2 heat exchanger, Ft is calculated from the equation:


TH in  TH o u t
 1 S  Where R 
ln  TCo u t  TCin
Ft 
( R 2  1) 1  RS 
and
R 1  2  S (R 1  R2  1 
ln   TCo u t  TCin
S
 2  S ( R  1  R 2
 1  TH in  TCin

In this case this gives Ft = 0.939. You


should check this by doing the calculation
by hand (or in Excel, as shown on the
right).

UniSim won’t let us use an uneven


number of tube passes (see the Rating,
Sizing tab of the heat exchanger) so the
simplest heat exchanger we can configure
is 1-2.

Problem 2
Set up a second heat exchanger. Again we’ll just use H2O. Set the tube in temperature to be
25oC, pressure to be 300kPa, and flow rate to be 9000kg/hr. Set the shell flow in to be 90oC,
pressure 200kPa, and flow rate to be 6000kg/hr.
Configure the heat exchanger to have a UA of 6000kJ0C-1hr-1 (you’ll need to check the UA
active box again to do this). Again set the Delta P to be 30kPa.
This gives the heat exchanger enough information to be solved. Record the values for the
outlet temperatures and see if they are consistent with your calculations.

Problem 3
For our final heat exchanger we will configure inputs of H2O at a temperature of 25oC and
benzene at a temperature of 95oC. The pressures in all four streams are 101.3kPa. The flow
rates are 9000kg/hr for the H2O and 2000kg/hr for the benzene. The heat exchanger has a
UA of 2x104kJ0C-1hr-1.
There will be a phase change in the heat exchanger so this will dictate which fluid is in the
shell and which in the tubes.
Make all the connections to solve the heat exchanger. Then plot a graph (performance plots)
of temperature versus heat flow. Note how the phase change affects this graph. If you right
click on the graph and choose Graph Control you can change the plot colours to something
clearer.

Report
Your report should consist of the following:
 Screenshots of the PFD for all three systems (1.5 marks)
 Screenshots of the Worksheet for all three systems (1.5 marks)
 Calculations for the first two systems, showing if our sums agree with what is shown
in UniSim. (6 marks)
 Screenshot of the graph from problem 3 (1 marks)

26
Week Six PROCESS CONTROL - 08 TANK DYNAMICS

Dynamic Simulation of a Tank Separator System


Dynamic simulation enables us to see the effect of disturbances on a system. This is
especially critical for batch systems, where steady state operation is the exception
rather than the norm.
We will begin with a simple system involving a tank being fed by a single stream
which separates into a liquid stream and a vapour stream. We will use three valves
as controllers.

First we need to set up the steady state mode:

Create a fluid package containing ethane, propane, i-butane, and n-butane. Choose
the Chao-Seader fluid package (this is a good choice for hydrocarbons and light
gasses). You won’t need to worry about binary coefficients here.
Create the pdf as shown below:
 The Feed stream composition is 10% ethane, 20% propane, 30% i-butane,
and 40% n-butane
 The Feed stream flow rate is 100kgmolhr-1
 The Feed stream temperature is 70oC
 The Feed stream pressure is 2000kPa
 The pressure drop (DeltaP) across valve 1 is 1500kPa
 The pressure drops across valves 2 and 3 are 200kPa
 The pump has a pressure rise of 200kPa

Now we need to prepare our simulation for the switch into dynamics mode. This is
important because some factors, like for instance the tank size, have no impact on
the steady state conditions but are critical to know when it comes to the time
response of the system, its dynamics.
 For each of the three valves, go to their dynamics tabs, set the Valve Opening
% to 50%, check on the Check Valve box, and click on the Size Valve button
 For the pump, on its dynamics tab, ensure the pressure rise and efficiency
buttons are clicked. This will ensure that the pump maintains the same pump
pressure head as flowrates change during the dynamic simulation.
 The size of the tank is chosen to be 2.13m3 with a diameter of 1.11m. This
gives 10 minutes of hold-up (liquid flow rate is 3499kg/hr, liquid density is
547.7 kg/m3, and the vessel is 50% full) and keeps the superficial vapour
velocity below 0.187m/s.

27
Week Six PROCESS CONTROL - 08 TANK DYNAMICS

At this point save your programme, including steady state in the name. Once we
switch into dynamics mode UniSim will make changes to our programme that will be
hard to reverse so it’s good to keep a steady state copy, just in case.

Switch to dynamics mode by clicking on on the toolbar. Accept the changes that
UniSim recommends. Make sure the dynamics mode button is depressed.

We want to include two control elements in our pdf:


1. flow control the feed with valve 1
2. control tank level with valve 2

 Click on the PID controller icon on the palette, drag it onto the pfd above
valve 1.
 Click on Select PV and choose Feed, and Molar Flow.
 Click on Select OP then choose valve 1, and actuator desired position.
On the parameters tab of the controller
 Select reverse acting (increase in flow results in a closing of the valve).
 Set the range to be 0-200kgmolhr-1 (twice the steady state value).
 Select Mode, Auto (because the controller gets its set point from another
controller.
 Set the PID constants to be Kc = 0.5 and Ti = 0.3minutes. Leave Td empty.
 Click on the Faceplate button and drag the faceplate up above the pdf window

Add the tank level controller


 choosing Tank, Liquid Percent Level for the PV
 choose valve 2 for the OP
 choose a range of 0-100%
 choose direct action (an increase in tank level leads to an opening of the
valve)
 Set Kc = 2 and leave Ti and Td empty.
 Select Mode, Auto
 Again, click on the Faceplate button.

Save your work. The pdf should look like this:

28
Week Six PROCESS CONTROL - 08 TANK DYNAMICS

Your next job is to add a third controller to control the tank pressure level (called
here Vessel Pressure (dynamic specification)). A range of 300-700kPa seems OK,
and a Kc = 2 would work. We’ll leave it a proportional only controller so leave T i and
Td empty. But you’ll need to find the correct PV, select the appropriate OP, and
decide if it’s direct or reverse acting.

Installing Recorders
We need to be able to see how variables are changing with time, dataloggers and
strip charts are useful for this. And even though the visualisation and analysis of data
isn’t that great in UniSim, it does let us export to other applications like Excel.
1. Open up the databook (from the Tools menu)
2. From the variables tab, click insert, then click Liquid, Molar Flow.
3. Click insert again and choose the Liquid percent level in the tank and then the
tank vessel pressure (dynamic spec), the Feed molar flow and the Vapour molar
flow.
4. Go to the strip charts tab. Click add
to install a datalogger and click on
the three molar flows to make them
active
5. Click View, StripChart. Right click
on the window that appears and
choose Graph Control. Adjust the
colours to something more
appealing (and more printer friendly)
than a black background. As well as
Graph control, note the other
options such as Select Curve, and
the two Autoscale’s. These are .
useful.

6. On the Time Axis tab click on Set Up Logger and change the number of samples
to 3600 and the sampling interval to 50 seconds.

7. This is a good time to save your simulation (give it a file name with dynamic in the
title this time). Once we start playing around with set points it is possible to make it
unstable and we might need to start again.
8. Run the simulation by clicking the integrator active button on the toolbar.
9. See how changes in Feed flow effect the flows in the vapour and liquid streams.
Adjust the set point on the Feed flow rate by dragging the red arrow on the FIC-
100 Faceplate. Note the changes in the flow rates in the liquid and vapour
streams. Which one responds more rapidly?

29
Week Six PROCESS CONTROL - 08 TANK DYNAMICS

10. We can also examine other dependencies. For example, note how a change
in the LIC-100 set point leads to a temporary change in the liquid molar flow.

11. To export data to another application, go back to the databook, highlight the
datalogger you used, and click historical. The file can be exported to a .csv file
which can be opened by Excel for example.

Report
In your report include the following:
 A screenshot of the pdf, also detail the steps you took to include the tank
pressure controller (3 marks)

30
Week Six PROCESS CONTROL - 08 TANK DYNAMICS

 A screenshot of a strip chart showing the response of the system to a step


change in the feed flow rate. Use this chart to explain the connections
between changes in the flow rates of the three streams. (2 marks)
 A screenshot of a strip chart showing the response of the system to a step
change in the tank fill level set-point. Use this chart to explain the connection
between fill and liquid flow rate (2 marks)
 A screenshot showing data exported to Excel (1 marks)
 Justify the choice of 2.13m3 for the tank size. (2 marks)

31
Week Seven PROCESS CONTROL - 09 MIXING DYNAMICS

Mixing Dynamics
This lab sets out to examining the dynamic behaviour of a mixing system in response to a
change in one of the input streams. We will be setting up and running a mixing system in
UniSim, exporting its results into ExCel, and analysing these results with mathematical
modelling.

UniSim Steady State


Create a component list including toluene and benzene. Use Peng-Robinson as the fluid
package. Set up the following pfd and worksheet as shown below. Note, you should set the
Tank to have a volume of 0.05m3:

Save your file.

UniSim Dynamics
Switch to Dynamic Mode ( ) and accept the change that UniSim proposes. You might
need to click the dynamic mode button a second time for these to take effect. Note that on
the worksheet, the molar flow values for Input A, Input B and Output are now in blue,
meaning they can be adjusted.
We want to examine the composition of the Outlet stream as we change the inlet streams,
so add a Strip Chart tracking the mole fraction of toluene in the outlet along with the flow rate
of Input A. Click on Tools, then Databook and set up the variables as shown below. Go to
the strip charts tab, Add a Datalogger, and click on our two variables to make them active.
The click on Strip Chart.

32
Week Seven PROCESS CONTROL - 09 MIXING DYNAMICS

Right click on the Strip Chart. Make the colour scheme more attractive. And Click on Set-up
Logger. Set the number of Logger Size to be 3600 samples and the interval to be 50s.

Now, go back to the workbook and set the Molar Flow rate of Input A to be 2.389kgmol/h
and the Molar Flow of the Outlet to be 4.645kgmol/h. This should make the mass flow rates
200kg/h and 400kg/h respectively. This is a good time to save your file again.

Now click on the Integrator Active button ( ) and choose 100% Liquid. Let the integrator
run for a couple of seconds (but no more, otherwise the amount of data becomes huge) until
the Comp Mole Fraction (Toluene) line levels off and then stop it with the integrator holding
button ( ). You should get a chart something like this:

33
Week Seven PROCESS CONTROL - 09 MIXING DYNAMICS

Export the data to an excel compatible format by clicking on the Historical button of the
Databook and choosing the .csv format (which can be opened by excel):

Excel

Open up Excel and open up the .csv file


you just created. It should look a bit like DataLogger1 Tue Apr 09 15:37:15
the image below, with a plot of the comp 2013 2 3600 142 0.5 ----- Outlet -
mole fraction opposite. Comp Mole Frac (Toluene) []
0.57
0.56
0.55
0.54
0.53
0.52
0.51
0.5
0.49
0 2000 4000 6000 8000

Note that the Time column begins at 0.5s. This is important. If you have a time offset in your
excel data you will need to recalibrate this by subtracting the ~initial time from all the values
in the Time column.

Mathematical Analysis
The Comp Mole Fraction curve, we’ll call it x(t), should follow an equation like:

x(t ) 
1

  Ke   t

Where β is the outlet mass flow (=400kg/h), α is the total inlet mass flow of toluene
(=200*0.4+200*0.75=230kg/h), and λ = β/[(volume of tank)*density]. K is a constant of
integration that we can estimate from the value of x(0) =0.5.

We are going to fit our data in excel to this curve to get values for α, β, and the density ρ.

34
Week Seven PROCESS CONTROL - 09 MIXING DYNAMICS

On our excel sheet, create a little table of values that we will use to fit our data to the formula
above. Give these values names so we can use them more easily in the formula. This is
shown below, click on the cell that contains the value for alpha (e.g. the cell E2 below which
has the value 230 in it rather than D2 which has the name alpha in it), and type in alpha into
the Name Box. Do likewise for beta, density, and constant.

We are now going to create a new column in our excel sheet for the predicted value of x(t)
and fill it out with values based on our equation. Do this as shown below. Note, the 0.05
refers to the tank volume and the 3600 is to convert from hours to seconds.

Having done this for one cell, you can copy this formula for every subsequent cell (i.e. Fill,
Down). The fastest way to do this is to left click the bottom right corner of the first cell, drag
down over the column, and then chose copy cell. See the diagrams below for before and
after.

35
Week Seven PROCESS CONTROL - 09 MIXING DYNAMICS

Left click
here

Now we have the predicted composition for all values of time. We can take the difference
between the actual and predicted values and calculate the square of the difference.

Again, we fill down the entire column, and then we take the sum of all the values in the
column using, for example, AutoSum.

This gives
the total for
all the
values in the
Δx² column

Now for the analysis. Launch Solver from the Data menu (you might need to install solver
from excel add-ons. If so, consult http://office.microsoft.com/en-us/excel-help/load-the-
solver-add-in-HP010021570.aspx):

36
Week Seven PROCESS CONTROL - 09 MIXING DYNAMICS

Solver brings up a dialog box that you can fill out as shown below:

This is the cell address


of the autosum total
When you are
Click Min ready, click solve

Choose the cell


addresses of alpha,
beta, density, and
constant
When this is done, choose to keep Solver solution and click OK.
Now plot a graph in Excel of the new predicted values for Δx² and the UniSim values. It
should look something like:

15. Report
Your report will consist of:
 A screenshot of your PFD (1 marks)
 A screenshot of the workbook (1 marks)
 A screenshot of the strip chart from UniSim (2 marks)
 A screensot of the fitted parameters alpha, beta, density, and constant from
the excel workbook. (3 marks)
 A screenshot of the fitted curve from excel (3 marks)
 And you’ll get extra marks if you can justify the equation

x(t ) 

  Ke 
1  t

(we’ll talk about this equation in class)

37

You might also like