Difference between revisions of "Dynamic models - 2014"
Jump to navigation
Jump to search
Kevin Dunn (talk | contribs) |
Kevin Dunn (talk | contribs) |
||
Line 51: | Line 51: | ||
| video_download_link11_MP4_size = M | | video_download_link11_MP4_size = M | ||
| video_notes11 =}}__NOTOC__ | | video_notes11 =}}__NOTOC__ | ||
== Readings and preparation for class; video and audio files == | == Readings and preparation for class; video and audio files == | ||
Line 69: | Line 59: | ||
! Class number | ! Class number | ||
! colspan="2"|Video and audio files | ! colspan="2"|Video and audio files | ||
! Main concepts | |||
! Reading (Marlin) | ! Reading (Marlin) | ||
! Reading (Seborg*) | ! Reading (Seborg*) | ||
Line 79: | Line 70: | ||
| [http://learnche.mcmaster.ca/media/2014-3P4-Class-02A.mp4 Video] (361M) | | [http://learnche.mcmaster.ca/media/2014-3P4-Class-02A.mp4 Video] (361M) | ||
| [http://learnche.mcmaster.ca/media/2014-3P4-Class-02A.mp3 Audio] (42M) | | [http://learnche.mcmaster.ca/media/2014-3P4-Class-02A.mp3 Audio] (42M) | ||
| style="text-align: left;"| | |||
* Why we need process models | |||
* What is "steady state" | |||
* General balance equations | |||
* Derived the tank height model | |||
| rowspan="6" |Chapter 3, Chapter 4 and Appendix B | | rowspan="6" |Chapter 3, Chapter 4 and Appendix B | ||
| rowspan="6" |Chapters 2, 3, 4 and 5 | | rowspan="6" |Chapters 2, 3, 4 and 5 | ||
Line 91: | Line 87: | ||
| [http://learnche.mcmaster.ca/media/2014-3P4-Class-02B.mp4 Video] (364M) | | [http://learnche.mcmaster.ca/media/2014-3P4-Class-02B.mp4 Video] (364M) | ||
| [http://learnche.mcmaster.ca/media/2014-3P4-Class-02B.mp3 Audio] (43M) | | [http://learnche.mcmaster.ca/media/2014-3P4-Class-02B.mp3 Audio] (43M) | ||
| style="text-align: left;"| | |||
* Use of the integrating factor | |||
* Analytical solution of the tank height model | |||
* MATLAB solution of ODEs | |||
| None | | None | ||
|- | |- | ||
Line 97: | Line 97: | ||
| [http://learnche.mcmaster.ca/media/2014-3P4-Class-02C.mp4 Video] (227M) | | [http://learnche.mcmaster.ca/media/2014-3P4-Class-02C.mp4 Video] (227M) | ||
| [http://learnche.mcmaster.ca/media/2014-3P4-Class-02C.mp3 Audio] (42M) | | [http://learnche.mcmaster.ca/media/2014-3P4-Class-02C.mp3 Audio] (42M) | ||
| style="text-align: left;"| | |||
* Coffee cooling example | |||
* What is the Laplace transform | |||
* Using Laplace to solve the coffee cooling problem | |||
| rowspan="2" style="text-align: left;"| | | rowspan="2" style="text-align: left;"| | ||
:An amazing description of where the Laplace transform comes from: [http://www.youtube.com/watch?v=zvbdoSeGAgI Video 1] and continues [http://www.youtube.com/watch?v=hqOboV2jgVo with video 2] | :An amazing description of where the Laplace transform comes from: [http://www.youtube.com/watch?v=zvbdoSeGAgI Video 1] and continues [http://www.youtube.com/watch?v=hqOboV2jgVo with video 2] | ||
Line 105: | Line 109: | ||
| [http://learnche.mcmaster.ca/media/2014-3P4-Class-03A.mp4 Video] (367M) | | [http://learnche.mcmaster.ca/media/2014-3P4-Class-03A.mp4 Video] (367M) | ||
| [http://learnche.mcmaster.ca/media/2014-3P4-Class-03A.mp3 Audio] (43M) | | [http://learnche.mcmaster.ca/media/2014-3P4-Class-03A.mp3 Audio] (43M) | ||
| style="text-align: left;"| | |||
* | |||
|- | |- | ||
| 22 January | | 22 January | ||
Line 110: | Line 116: | ||
| [http://learnche.mcmaster.ca/media/2014-3P4-Class-03B.mp4 Video] (305M) | | [http://learnche.mcmaster.ca/media/2014-3P4-Class-03B.mp4 Video] (305M) | ||
| [http://learnche.mcmaster.ca/media/2014-3P4-Class-03B.mp3 Audio] (42M) | | [http://learnche.mcmaster.ca/media/2014-3P4-Class-03B.mp3 Audio] (42M) | ||
| style="text-align: left;"| | |||
* | |||
| None | | None | ||
| None | | None | ||
Line 116: | Line 124: | ||
| 03C | | 03C | ||
| | | | ||
| | |||
| | | | ||
| None | | None |
Revision as of 16:35, 22 January 2014
Class date(s): | 13 to 24 January 2014 | ||||
| |||||
| |||||
| |||||
| |||||
| |||||
Readings and preparation for class; video and audio files
Date | Class number | Video and audio files | Main concepts | Reading (Marlin) | Reading (Seborg*) | Reading (other) | Handout | |
---|---|---|---|---|---|---|---|---|
13 January | 02A | Video (361M) | Audio (42M) |
|
Chapter 3, Chapter 4 and Appendix B | Chapters 2, 3, 4 and 5 |
|
None |
15 January | 02B | Video (364M) | Audio (43M) |
|
None | |||
17 January | 02C | Video (227M) | Audio (42M) |
|
|
Table of Laplace transforms (from Seborg) | ||
20 January | 03A | Video (367M) | Audio (43M) |
| ||||
22 January | 03B | Video (305M) | Audio (42M) |
|
None | None | ||
24 January | 03C | None | None |
* The book by Seborg et al. is easily available new or second hand, as it was the prescribed textbook in 2013 (Marlin's book was prescribed in 2012). I will make reference to the chapters from Seborg on the website as well.
Test your understanding before and after class with these resources from Dr. Thomas Marlin. This website also contains full Powerpoint slides for each chapter from his textbook. Use this as a resource if you are still waiting for your copy of the Marlin textbook to arrive.
Computer code: class 02B, 15 January
In a file called cstr_height.m:
function d_depnt__d_indep = cstr_height(indep, depnt)
% Dynamic balance for the CSTR height
% indep: the independent ODE variable, such as time or length or the reactor
% depnt: a VECTOR of dependent variables
%
% Returns:
%
% d(depnt)
% ---------- = a vector of ODEs
% d(indep)
% Assign some variables for convenience of notation: one row per DEPENDENT variable
h = depnt(1);
% Constant and other equations
A = 0.5; % m^2
F_i = 0.8; % m^3/min
R = 15; % min/m^2
F_o = h/R; % m^3/min
% Output from this ODE function must be a COLUMN vector, with n rows
% n = how many ODEs in this system?
n = numel(depnt); d_depnt__d_indep = zeros(n,1);
% Specify every element in the vector below: 1, 2, ... n
d_depnt__d_indep(1) = 1/A * (F_i - F_o);
The call the above model file from the "driver"; you can call this file anything, e.g. ODE_driver.m:
% The independent variable always requires an initial and final value:
indep_start = 0.0; % s
indep_final = 50.0; % s
% Set initial condition(s): for integrating variables (dependent variables)
h_depnt_zero = 4.0; % i.e. h(t=0) = 3.0
IC = [h_depnt_zero];
% Integrate the ODE(s):
[indep, depnt] = ode45(@c02B_linear, [indep_start, indep_final], IC);
% Plot the results:
clf;
plot(indep, depnt(:,1))
grid('on')
hold('on')
xlabel('Time [min]')
ylabel('Tank height')
legend('h')
title('Tank height with time')
% Does it match the analytical equation?
height = 12 - 8.*exp(-indep/7.5);
hold on
plot(indep, height, 'r.')