Professional Documents
Culture Documents
Week 1
Introduction to Simulink
Familiarization with Simulink blocks
Sources: Constants
Sinks: Display
Operations: Sum, Product, Add, Divide.
Mathematical operations involving blocks for sources, sinks and operations.
1 0
Constant
sum Display
Constant1
Divide
Constant2
Tutorial
a. 1 + 2 =
b. 2/3 + 4/5 =
d. 4/(9-5/6) + 3/(8/5-2) =
Homework
a. Reynold number
Dvρ
N=
µ
where,
Abdul Aziz Ishak, Faculty of Chemical Engineering, Universiti Teknologi MARA Malaysia (2009)
b. Heat capacity
The following problem is taken from Himmelblau p.533 (1982, 6th Ed.).
Abdul Aziz Ishak, Faculty of Chemical Engineering, Universiti Teknologi MARA Malaysia (2009)
Simulink Tutorial 2 CPE562
Week 2
1 0
Constant
sum Display
Divide
Ramp
Scope
u
e
Math
Step Function
f(u)
Fcn
Tutorial
Abdul Aziz Ishak, Faculty of Chemical Engineering, Universiti Teknologi MARA Malaysia (2009)
2. Calculate heat capacity using FCN block.
where, T = 400.
Doubled and tripled the temperature and observe the effect to Cp.
Homework
Dvρ
N=
µ
Starting data:
pH = - log10 [H+]
3. A power-law fluid having a density of 1041 kg/m3 is flowing through 14.9 m of a tubing
having an inside diameter of 0.0524 m at an average velocity of 0.0728 m/s. Given that
the friction factor is 14.44, calculate the pressure drop as given by the following
relationship.
L V2
∆p = 4 f ρ
D 2
Study the effect V to ∆p when the value of V is doubled until V = 1.1648 m/s.
Abdul Aziz Ishak, Faculty of Chemical Engineering, Universiti Teknologi MARA Malaysia (2009)
Simulink Tutorial 2 CPE562
Week 3
Mathematical operations involving blocks for sources, sinks, operations and signal splitting.
f(u)
Mux Demux
Tutorial
slope = 1
Ramp1
slope = -1
Scope
Mux
Ramp2
Abdul Aziz Ishak, Faculty of Chemical Engineering, Universiti Teknologi MARA Malaysia (2009)
Result
slope = 1
Ramp1
Scope1
slope = -1
Mux Demux
Ramp2 Scope2
After running, observe Scope1 and Scope2. What can you conclude?
Homework
1. Prepare an innovative simulink program to calculate the following heat capacity problem.
Observe the effect of Cp when T is doubled and tripled. You may need other blocks that
you had learned last week in order to solve this problem.
The following problem is taken from Himmelblau p.533 (1982, 6th Ed.).
Abdul Aziz Ishak, Faculty of Chemical Engineering, Universiti Teknologi MARA Malaysia (2009)
2. Observe the effect of changing power index from 0.5 to 1.5 for every 0.5 increment of the
following relationship:
Sample of solution.
u(1)^0.5
Ramp Fcn
Scope
u(1)^1
Fcn1
u(1)^1.5
Fcn2
Abdul Aziz Ishak, Faculty of Chemical Engineering, Universiti Teknologi MARA Malaysia (2009)
Simulink Tutorial 4 CPE562
Week 6
Mathematical operations involving blocks for sources, sinks, operations and signal splitting.
Tutorial
To Workspace1
u[1]^3
Clock
Fcn Scope
To Workspace
3. Set To Workspace, To Workspace1 data saving format to Array and variable name to y
and x respectively.
Abdul Aziz Ishak, Faculty of Chemical Engineering, Universiti Teknologi MARA Malaysia (2009)
11.
1000
900
800
700
600
y = x3
500
Y
400
300
y = x2
200
100
0
0 1 2 3 4 5 6 7 8 9 10
X
12. Get your self acquainted with all command in Figure (File, Edit, View, etc.) esp. Property
Editor to label x, y axes and Text Arrow to label line plots.
Abdul Aziz Ishak, Faculty of Chemical Engineering, Universiti Teknologi MARA Malaysia (2009)