Process Simulation Lab Manual For Chemical Engineering - Graduate Level
Process Simulation Lab Manual For Chemical Engineering - Graduate Level
CHL 411
SEMESTER SEVEN
Equation of state
Aim: To study the effect of temperature and pressure on molar volume of a gas using various
equation of state with the help of MS Excel, Matlab and DWSIM
Theory: Solving equations of state (EOS) allows us to find the specific volume of a gaseous
mixture of chemicals at a specified temperature and pressure.
TC is the critical temperature, PC is the critical pressure, and Tr is the reduced temperature
Question: Find the specific volume of n-butane at 500 K and 18 atm using the redlich–KwongEOS.
Step 2 Calculate values of a and b using the given equation. The value of gas constant in these
units is 0.08206 l atm/g mol K.
Step 3 Prepare the spreadsheet shown in Figure. The title, name, and data will be useful when
you come back to the problem at a future date.
Step 4 You enter the parameters in the parameter box. The cells containing the critical
parameters and the temperature and pressure can be named TC , PC, T, and p, respectively. That
way, the equation for f(v) will be easier to understand.
Step 5 The lower box gives the equations actually used as well as the results. Use the Goal Seek
command to make f(v) (cell E14) equal to zero by changing cell v (C13).
Step 7 How can you check this result? First, you have to be sure you have put the correct
formulas into the spreadsheet, and that the units are consistent. That can only be determined by
reference to the original equations and critical properties.
Result
This function, called ‘specvol’, defines the problem you wish to solve.
Step 2 To test the function ‘specvol’ you issue either of the following commands:
feval(‘specvol’,2) ans=specvol(2)
The feval function causes MATLAB to compute the value of y (the output defined in specvol)
using the m-file named specvol when v = 2. The output you get is:
Figure 3: Sample MATLAB first output file EOS
You should check these results line by line, especially the calculation of aRK, bRK, and y.
Step 3 Next change the function “specvol” by adding a semicolon (;) at the end of each line. This
suppresses the output. Do this and save the m-file, “specvol”.
In feval, the 2 was the v to be used in the calculation, whereas in fzero 2 is an initial guess of the
answer.
Result
Step 5 To check, you might evaluate the function to find how close to zero, f(v) is.
Next rearrange the MATLAB code to compute the compressibility factor for a number of
pressure values. The compressibility factor is defined as
For low pressures, where the gas is ideal, the compressibility factor will be close to 1.0. As the
pressure increases, it will change. There are two new features illustrated: the use of global and
plotting.
Step 6 The code called ‘EOS’ computes the specific volume for pressures from 1 to 50
atmospheres and then calculates the corresponding compressibility factor.
Step 7 Finally, a plot is made with pressure along the x-axis and Z along the y-axis.
Step 8 The m-file specvol is changed to use the global command.Now the parameters are
available to specvol because they are defined as global variables and have been set in the
program ‘EOS’.
Figure 6: Modified Specvol file
Step 9 Run the file for different temperatures 430 K, 450 K and 600 K to obtain the plot.
Step 2 Click ‘Next’ to continue and add component ‘n-butane’ from the list and again click
‘Next’.
Step 4 Select custom unit C5, change unit of temperature to K, that of pressure to atm,
volumetric flowrate to L/s and molar flow rate to mol/s, then click ‘Finish’.
Step 5 Drag and drop a material stream from the Object Pallette window.
Step 6 Click on the added stream and rename it as ‘Feed’ and press ‘Enter’
Step 7 Select Input Data > Stream Conditions, change Temperature as 500 K and Pressure as 18
atm. Press ‘Enter’ after each entry. Select ‘Compound Amounts’ tab and make sure Basis is
selected as ‘Mole Fractions’ and N-butane has a value equal to 1.
Step 9 Click on Insert > Master Property Table. Double click on the table and select Object as
‘Feed’ and select ‘Default Properties Only’ and close the ‘Configure Master Property Table’
window.
Step 10 Right click anywhere on the Flowsheet and select ‘Copy As Image’, this has to presented
as Result along with Report generated by clicking ‘Results’ > Create Report. From ‘Available
Items, select ‘Material Streams’ and click ‘View Report’.
Results
Inference Specific volume obtained through MS Excel and MATLAB is 2.037 L/mol and that
through DWSIM is 2.05 L/mol. Pressure-Z graph is also plotted using MATLAB.
Experiment No.2
Phase equilibrium
Theory:
Consider the flow sheet shown in Figure. Suppose you know the temperature, pressure, and
overall composition of the inlet stream. The mole fractions of the chemicals in the
inlet are called {zi}. In the phase separator, however, the liquid and vapor are separated. The
mole fraction of the chemicals in the vapor phase are called {yi} and those in the liquid phase are
called {xi}. When the vapor and liquid are in equilibrium, you can relate the mole fractions of
each chemical in the vapor and liquid by the equation:
The members of the set {Ki} are called K-values, and they can be predicted from
thermodynamics, as shown below. For now, though, assume that you know their values.
To derive the equation governing the phenomenon, you first sum the mole fractions of vapor and
liquid over all components.
Next, make a mass balance for each component over the phase separator. F is the total molar
flow rate, V is the molar flow rate of the vapor, and L is the molar flow rate of the liquid. The
mole balance is then
Put that expression into previous equation to obtain the final equation:
This is called the Rachford –Rice equation. Notice that, if the K-values and inlet compositions {zi}
are known, this is a nonlinear equation to solve for v’ . Thus, you can apply here the same
methods used with Excel and MATLAB in Experiment 1. Once the value of v’ is known, you
can calculate the value of the liquid compositions, {xi}, and vapor compositions, {yi. The mole
balance is then complete.
Step 1 Zi and Ki values of different components are entered in column B and column C
respectively
Step 2 Column D calculates the Rachford-Rice formula for different components separately and
sums up it in cell D9.
Step 3 You can then use Goal Seek to make the Rachford –Rice equation (cell C9) zero by
changing the fraction of the feed that is vapor (cell D10), giving the result shown. Once you find
the fraction vapor, the mole fractions in the two phases are easy to calculate using equations, and
these are included in columns E and F.
Step 5 Rachford –Rice equation to sum to zero, which is evident in the spreadsheet. Check that
the sum of vapor mole fractions equals one, and the sum of liquid mole fractions equals one.
Result
Step 1 Program the function and save it in your working directory as vpliq.m.
Result
Step 1 Start DWSIM > add all components > select SRK property package > select a custom unit
and change unit of Temperature to F and that of pressure to psi.
Step 3 Rename the input stream as feed, top product as Vapour and bottom product as Liquid.
Give the stream conditions and its compound amounts and change the molar flow rate as 100
kmol/h.
Step 4 Check the Results tab within Feed property window. Vapour fraction comes out to be
42.6 %
Step 5 Add a Master Property Table with mole fractions and display the results.
Results
Inference The values obtained through Excel, MATLAB and DWSIM are agreeing.
Experiment No.3
Aim: Study of various possibilities of finding the product composition in an equilibrium reaction
using MS Excel, Matlab and DWSIM
Theory:
As a specific example, consider the water–gas shift reaction that can be used in a chemical
process to make hydrogen for fuel cell applications:
At equilibrium,
Thermodynamic data give the value of ln K = 5 (or K = 148.4) at 500 K. If you start with a
stoichiometric mixture of carbon monoxide and water, what will the equilibrium composition be?
In this case, the number of moles remains the same when the reaction takes place, and you are
left with
To begin, make a mole balance table (see Table 2), with a basis of 1 mol each of carbon
monoxide and water, which then react to equilibrium. Use x to represent the number of moles
reacting, thus giving the values in the table.
Put the mole fractions into Eq. (4.13) and simplify:
You can easily solve this equation by taking the square root, giving x = 0.924. In more
complicated cases it would not be possible to solve it so easily. Instead, you would have to solve
a nonlinear equation numerically to find the value of x. When there are multiple reactions, which
may also be in equilibrium, there will be several equations to solve simultaneously. Thus, being
able to solve multiple nonlinear equations is useful when dealing with reactions at equilibrium.
The calculations are conveniently done in a spreadsheet, and the final results are shown in Table
4.2. Let us see how to construct this spreadsheet.
Step 3 Then the equilibrium equation, is calculated in cell B13, according to the formula
displayed in cell E13.
Step 4 Finally, you use Goal Seek to make cell B13 zero by varying cell B12.
Result
Step 1 Construct an m-file that evaluates the function, given x. The name is ‘equil_eq.m’ and it is
listed below
Result
Step 1 Start DWSIM > add all components > select Raoult’s Law as property package > select a
custom unit and change unit of Temperature to K and that of pressure to atm.
Step 2 Click on Settings > Reactions > Add equilibrium reaction . Name the reaction as ‘Water
gas shift reaction’, Include all the 4 components, choose base component as Carbon monoxide,
Give ‘-1’ as stoichiometric coefficient for reactants and ‘1’ for products. Check whether the
stoichiometry is displayed as OK and select Phase as Vapor.
Figure 17: Adding Equilibrium reaction in DWSIM
Step 3 Close the above window and add Gibbs Reactor from the Object Palette Window
Step 4 Rename the input stream as Feed, top product as Vapour, bottom product as Liquid and
energy stream as Energy.
Step 5 Change the feed stream conditions as 500 K and 1 atm and molar flow rate as 100 kmol/h.
Change feed stream composition as equimolar mixture of carbon monoxide(0.5) and water(0.5).
Step 6 In reactor select calculation mode as Isothermic and click on ‘Solve Flowsheet’.
Step 7 Insert a Master property table and add default properties of all material streams. Add
another Master property table and select object as Gibbs reactor and add default properties.
Results
Inference Conversion Obtained through Excel and MATLAB is 92.4% and 92.1% through
DWSIM
Experiment No.4
Aim: Steady-state simulation of shortcut distillation column using process simulators such as
DWSIM
Question Using DWSIM find out the minimum reflux ratio, minimum number of stages, actual
number of stages, optimum feed stage location and heat duties for the separation of Benzene (0.4)
and Toluene (0.6) mixture at 1 atm pressure, fully liquid condition having flowrate of 100 kmol/h.
Benzene in distillate is 0.99 and Benzene in bottoms is 0.01. RR is 1.4 times the minimum. Also
plot the T-xy, P-xy, and xy diagrams.
Step 1 Start DWSIM > add components > choose Raoult’s Law as property package > choose
unit of pressure as atm.
Step 3 Rename the input stream as Feed, top product as Distillate, bottom product as Bottoms,
condenser duty as C Duty and reboiler duty as R Duty.
Step 4 Under feed stream conditions select Flash Spec as ‘pressure and vapor fraction’, change
temperature to 1 atm and vapor phase mole fraction as ‘0’. Also change mole fraction of
components as per given question. Molar Flow to 100 kmol/h.
Step 5 Select the column and select light key as Benzene and heavy key as Toluene. Light key
mole fraction in bottom is 0.01 and heavy key mole fraction in distillate is 0.01. Let reflux ratio
be 1.5.
Step 6 Run the simulation. Minimum Reflux Ratio obtained is 1.65509. Now change RR to
1.4*1.65509.
Step 7 Note the actual number of stages and optimal feed stage.
Step 9 To generate phase envelope diagrams go to utilities > add utility >Material streams >
binary phase envelope > Feed > Add utility.
Results
Inference A shortcut column was simulated and the required result was obtained. Binary Phase
envelope was generated.
Experiment No.5
Aim Steady-state simulation of rigorous distillation column using process simulators such as
DWSIM
Question Using the result obtained in the previous simulation (shortcut column) simulate a
distillation column using Rigorous model. Also use sensitivity study and Controller block to
obtain a purity of 99% in Distillate.
Step 1 Start DWSIM > add components > choose Raoult’s Law as property package > choose
unit of pressure as atm.
Step 3 Rename the input stream as Feed, top product as Distillate, bottom product as Bottoms,
condenser duty as C Duty and reboiler duty as R Duty.
Step 4 Under feed stream conditions select Flash Spec as ‘pressure and vapor fraction’, change
temperature to 1 atm and vapor phase mole fraction as ‘0’. Also change mole fraction of
components as per given question. Molar Flow to 100 kmol/h.
Step 5 Select the distillation column, under general tab select Number of Stages as 21. Under
Specifications tab select condenser and specification to Reflux Ratio and its value to 2.31713.
Then select reboiler and change Product molar flow to 60.204 kmol/h. These values were
obtained in experiment 4.
Step 6 Next under connections > stream conditions > Feeds, select column feed port 5 as Feed.
Also check Products, Duties and Side draws.
Step 7 Next select Stream-Stage Associations and select Feed stage location as stage 9
Step 11 Under Dependent Variables add a new variable, select the object as distillate and
property as Mole Fraction (Mixture)/Benzene.
Step 12 Go to results and click on Start Sensitivity Analysis, We got .99 for a RR of 2.381.
Step 13 Next go to logical blocks and add a controller block, select manipulated object as the
column, property as condenser_specification_value, controlled object as distillate, controlled
property as Molar fraction (Mixture)/Benzene and Set point as 0.9901. Click on Start Adjust.
Figure 27: Sensitivity study
Inference Rigorous distillation column was simulated and interstage profiles were obtained. Both
sensitivity study and controller block gave a value of 2.3801 for 99% purity.
Experiment No.6
Aim Steady-state simulation of a heat exchanger using process simulators such as DWSIM
Question Simulate a heat exchanger, calculate the outlet stream temperature, thermal efficiency
and LMTD. Hot stream is methanol at 80 C, 5 bar, 25000 kg/hand cold stream is water at 10 C, 1
bar and 15000 kg/h. Flow type is counter current, overall heat transfer coefficient is 450 W/m2K,
Heat exchanger area is 250 m2, cold fluid pressure drop is 0.002 bar and hot fluid pressure drop is
0.025 bar. Roult’s Law may be used.
Step 1 Start DWSIM, add components, select property package and choose appropriate units.
Step 2 Add Heat Exchanger model from Exchangers tab. Rename the streams to Hot in, Hot out,
Cold in and Cold out. Change the stream conditions and compound amounts of Hot in stream and
Cold in stream as per the given question.
Step 3 Select the heat exchanger block verify the connections, select calculation type as
‘Calculate outlet temperatures’, flow direction as counter current, cold fluid pressure drop as
0.002 bar, hot fluid pressure drop as 0.025 bar, Global heat transfer coefficient as 450 W/m2K
and heat exchange area s 250 m2.
Result
Aim Steady-state simulation of a heat exchanger (rigorous mode) using process simulators such
as DWSIM
Question Simulate a Shell & Tube Heat Exchanger and calculate outlet stream temperatures,
overall heat transfer coefficient, heat exchange area, thermal efficiency and LMTD. Hot stream is
methanol at 80 C, 5 bar, 25000 kg/hand cold stream is water at 10 C, 1 bar and 15000 kg/h. Flow
type is counter current. Roult’s Law may be used. Type of Exchanger is 2-8 pass, total number
of tubes is 2048, tubes spacing is 25 mm, tube layout is square, thermal conductivity is 60 W/mK,
tube roughness is 0.05 mm, fouling factor tube is 0.00035 Km2/W and fouling factor shell is
0.00035 Km2/W. External diameter for tube is 20mm, tube thickness is 2.5 mm, tube length is 5m,
shell internal diameter is 1000 mm, baffle spacing is 250 mm, baffle cut is 25% and fluid in shell
is methanol.
Step 1 Start DWSIM, add components, select property package and choose appropriate units.
Step 2 Add Heat Exchanger model from Exchangers tab. Rename the streams to Hot in, Hot out,
Cold in and Cold out. Change the stream conditions and compound amounts of Hot in stream and
Cold in stream as per the given question.
Step 3 Select the heat exchanger block verify the connections, select calculation type as ‘Shell
and tube exchanger rating’, flow direction as counter current and click on ‘Edit shell and tube
heat exchanger profiles’.
Step 4 First we edit the shell properties. Enter shells in series as 1, shell passes as 2, internal
diameter as 1000mm, fouling factor, baffle spacing and baffle cut as given in the question.
Step 5 Next edit the tube properties. Internal diameter as 15mm, external diametr as 20mm,
length as 5m, fouling factor, roughness, thermal conductivity as given in question. Passes per
shell as 4, tubes per shell as 1024, tube spacing as 25 mm, select tube layout as square and select
fluid in tube as cold.
Results
Inference Simulation were carried out for a heat exchanger in ‘shell and tube exchanger rating’
mode and required result was obtained.
Experiment No.8
Aim Steady-state simulation of a Plug Flow Reactor using suitable example in process simulators
such as DWSIM/Unisim etc.
Question Simulate a Plug Flow Reactor (PFR), define a kinetic reaction, calculate conversion
and residence time for an irreversible reaction between Nitrogen and Hydrogen producing
Ammonia. Feed stream is an equimolar mixture (3600 kg/h) of Nitrogen and Hydrogen at 425 C
and 200 bar. Peng Robinson property package may be selected. Reactor is isothermal type with 1
m3 volume and 1.5 m length. Reaction Kinetics: rA = KC an, where K = 0.004 and n=1.
Step 1 Start DWSIM, add components, select property package and choose appropriate system of
unit.
Step 2 From Reactors tab add Plug-Flow Reactor (PFR) to the simulation.
Step 3 Rename the input stream to Feed and output stream to Product.
Step 4 Change the stream conditions and compound amounts of input stream as per the question.
Step 5 Next select the PFR and change the calculation mode as isothermic under General tab.
Under Dimensions tab change the volume and length of the reactor as per the question.
Inference A PFR was simulated using DWSIM and required result was obtained.
Experiment No.9
Simulation of Process
Aim Steady-state simulation of a typical chemical plant involving heat exchangers/ coolers/
heaters using process simulators such as DWSIM
Question Simulate an ammonia synthesis process. The feed (80 ℉ and 300 psi) to the process is
nitrogen (100 lb mol/h), hydrogen (300 lb mol/h) and a small amount of carbon dioxide (1 lb
mol/h) left over from the process to make hydrogen. The inlet stream is compressed to 4000 psi
with an adiabatic compressor. The stream is mixed with the recycle stream and heated to 900 ℉,
the reactor temperature. The reactor is designed using equilibrium reaction (Gibbs Reactor) and
there is a pressure drop of 30 psi in the reactor. The outlet is cooled to 80 ℉ and the liquid-vapor
phases are separated . The vapor phase goes to recycle, and 0.01 % of it is used as purge. A
recycle compresser then compresses the rest from 3970 to 4000 psi. Raoult’s Law may be
selected as property package.
Step 1 Start DWSIM, add components, select property package and choose appropriate system of
unit.
Step 3 From Pressure Changers add a Compressor, a Stream Mixer from Mixers/Splitters, a
Heater from Exchangers, a Gibbs Reactor from Reactors, again a heater, a Gas-Liquid Seperator
from Separators/Tanks, a Stream Splitter, a compressor and a Recycle Block from Logical Blocks.
Connect these blocks as shown in the Flowsheet.
Step 4 Change the Feed Stream Conditions and Compound Amounts as per the question.
Step 6 Change Heater HT-1 calculation type to Outlet Temperature and its value to 900 ℉.
Step 7 Next in the Gibbs Reactor select calculation mode as Isothermic and Pressure Drop to 30
psi. Also select all compounds.
Step 8 The top product from the reactor is connected to HT-2, where calculation type is selected
as Outlet Temperature and its value set to 80 ℉.
Step 9 Next in the splitter change the Purge stream split ratio to 0.0001.
Step 10 Next change the compressor C-2 outlet pressure to 4000 psi.
Figure 44: Heater 1
Figure 43: Compressor 1
Result
Inference Ammonia Synthesis Process was simulated and the product has a composition of 197
lbmol/h of Ammonia. Mass and Energy Balance was also verified.
Experiment No.10
Aim Dynamic simulation of a water storage tank and controlling the liquid level within the tank
at a desired level.
Question Dynamically model and simulate a water storage tank and control the liquid level
inside the tank around a desired value.
Given
Input Specifications
Property Package: Steam Tables
Inlet
Component Water
Feed Rate 10 Kg/s
Pressure 130 kPa
Valve 1
Kv max 100
Kv / Kvmax 50%
Storage Tank
Volume 2 m3
Available liquid height 2m
Valve 2
Kv / Kvmax 400
Kv / Kvmax 50%
Outlet
Pressure 101.325 kPa
Step 1 Start DWSIM, add component, select property package and choose appropriate system of
units as shown below.
Step 3 Enable /Activate Dynamic Mode (Dynamics Tab---- > Dynamic Mode)
Step 4 Set the Inlet stream Pressure to 130 kPa and mass flowrate to 10 Kg/s. Set its Dynamic
Spec to “Flow” as shown below.
Step 5 Set VALVE-1 calculation type to Liquid Kv, Kvmax to 100, check the Opening vs
Kv/Kvmax box and set the valve opening to 50%.
Step 6 Set TANK-1 volume to 2 m3 and available liquid height to 2 meters.
Step 7 Set VALVE-2 calculation type to Liquid Kv, Kvmax to 400, check the Opening vs
Kv/Kvmax box and set the valve opening to 50%.
Step 8 Set the Outlet stream Pressure to 101.325 kPa Set its Dynamic Spec to “Pressure” as
shown below.
Step 9 Add a Level Gauge (Indicators Tab - Level Gauge) and associate it with the TANK-1
Liquid Level property. Set maximum value to 3.0 meter.
Step 12 Create a new Schedule (Sch1) and associate the previously created Integrator and
Flowsheet State with it.
Step 13 Open the Integrator Controls Panel and run the dynamic simulation. Note the Liquid
level in the TANK-1 and the time required for stabilization.
Step 14 On the Integrator Control Panel, Click on the View Results button. On the created
Spreadsheet, Select the A and B columns and create a new chart from the selection. View the
generated chart.
Stage III Adding PID Controller
Step 15 Add a PID Controller (Controllers Tab --- PID Controller) to the flowsheet and Set the
VALVE-2 opening as the manipulated variable and TANK-1 liquid level as the controlled
variable. The Set-point should be equal to 1 (m). Set Kp to 100.
Step 16 Add a new Chart to the flowsheet and associate it with the PID’s History item.
Step 17 Open the Integrator Controls Panel and run the dynamic simulation. Note the Liquid
level in the TANK-1 and the time required for stabilization.
Step 18 Now Set the controller’s Ki to 10 and rerun the dynamic simulation. Note the Liquid
level in the TANK-1 and the time required for stabilization.
Results
Record the Liquid level in the TANK-1 and the time required for stabilization without controller,
with P and PI controllers. Record the dynamic simulation plots for each case.
Inference
Dynamic simulation of a water storage tank and controlling the liquid level within the tank was
carried out.