Difference between revisions of "Multiple reactions - 2013"
Jump to navigation
Jump to search
Kevin Dunn (talk | contribs) m |
Kevin Dunn (talk | contribs) m (→11 March 2013) |
||
Line 85: | Line 85: | ||
* [http://learnche.mcmaster.ca/media/3K4-2013-Class-09A.mp3 Audio] and [http://learnche.mcmaster.ca/media/3K4-2013-Class-09A.mp4 video] recording of the class. | * [http://learnche.mcmaster.ca/media/3K4-2013-Class-09A.mp3 Audio] and [http://learnche.mcmaster.ca/media/3K4-2013-Class-09A.mp4 video] recording of the class. | ||
=== 13 March 2013 === | |||
* [http://learnche.mcmaster.ca/media/3K4-2013-Class-09B.mp3 Audio] and [http://learnche.mcmaster.ca/media/3K4-2013-Class-09B.mp4 video] recording of the class. | |||
Code for the CSTR example: | |||
<syntaxhighlight lang="matlab"> | |||
tau = 0:0.05:10; | |||
CA0 = 2; % mol/L | |||
k1 = 0.5; % 1/hr | |||
k2 = 0.2; % 1/hr | |||
CA = CA0 ./ (1 + k1 .* tau); | |||
CB = tau .* k1 .* CA ./ (1 + k2 .* tau); | |||
CC = tau .* k2 .* CB; | |||
instant_selectivity = (k1.*CA - k2.*CB) ./ (k2.*CB); | |||
overall_selectivity = CB ./ CC; | |||
overall_yield = CB ./ (CA0 - CA); | |||
conversion = (CA0 - CA)./CA0; | |||
plot(tau, CA, tau, CB, tau, CC) | |||
grid on | |||
xlabel('\tau') | |||
ylabel('Concentrations [mol/L]') | |||
figure | |||
plot(tau, overall_selectivity) | |||
xlabel('\tau') | |||
ylabel('Overall Selectivity') | |||
grid on | |||
figure | |||
plot(tau, overall_yield) | |||
xlabel('\tau') | |||
ylabel('Overall Yield') | |||
grid on | |||
figure | |||
plot(tau, conversion) | |||
xlabel('\tau') | |||
ylabel('Conversion') | |||
hold on | |||
grid on | |||
</syntaxhighlight> |
Revision as of 23:12, 13 March 2013
Class date(s): | 06 March | ||||
| |||||
| |||||
| |||||
Textbook references
- F2011: Chapter 8
- F2006: Chapter 6
Suggested problems
Will be posted soon
Class materials
06 March 2013 (08B-2)
07 March 2013
Polymath code for example in class. Make sure you plot the instantaneous selectivity, overall selectivity and yield over time. Compare these 3 plots during the batch to understand what each of these 3 variables mean.
# ODEs
d(CA) / d(t) = -k1*CA
d(CB) / d(t) = k1*CA - k2*CB
d(CC) / d(t) = k2*CB
# Initial conditions
CA(0) = 2 # mol/L
CB(0) = 0 # mol/L
CC(0) = 0 # mol/L
# Algebraic equations
k1 = 0.5 # 1/hr
k2 = 0.2 # 1/hr
# The 3 important algebraic variables: plot these 3 against time and interpret them.
S_DU = if (t>0.001) then (k1*CA - k2*CB) / (k2*CB) else 0
Overall_SDU = if (t>0.001) then CB/CC else 0
Yield = if (t>0.001) then CB / (2 - CA) else 0
# Independent variable details
t(0) = 0
t(f) = 3.1 # hours
11 March 2013
13 March 2013
Code for the CSTR example:
tau = 0:0.05:10;
CA0 = 2; % mol/L
k1 = 0.5; % 1/hr
k2 = 0.2; % 1/hr
CA = CA0 ./ (1 + k1 .* tau);
CB = tau .* k1 .* CA ./ (1 + k2 .* tau);
CC = tau .* k2 .* CB;
instant_selectivity = (k1.*CA - k2.*CB) ./ (k2.*CB);
overall_selectivity = CB ./ CC;
overall_yield = CB ./ (CA0 - CA);
conversion = (CA0 - CA)./CA0;
plot(tau, CA, tau, CB, tau, CC)
grid on
xlabel('\tau')
ylabel('Concentrations [mol/L]')
figure
plot(tau, overall_selectivity)
xlabel('\tau')
ylabel('Overall Selectivity')
grid on
figure
plot(tau, overall_yield)
xlabel('\tau')
ylabel('Overall Yield')
grid on
figure
plot(tau, conversion)
xlabel('\tau')
ylabel('Conversion')
hold on
grid on