ChE 4190
Fall 2015
Lecture notes  November 13
Topic:
Nonadiabatic PFR
Reading:
H&R  Sec 10.4
Energy balance equation
Physical contributions (reaction, heat transfer, convection)
Alternate formats (conversion vs. position)
Coupling with material balance
ChE 4190
Fall 2015
Lecture notes  November 30
Topic:
Residence time distribution models
Reading:
H&R  Section 11.1
Residence time distributions
Differential ("Exitage" distribution)
Cumulative
Average residence time
Experimental measurement (stimulusr
ChE 4190
Fall 2015
Lecture notes  November 23
Topic:
Heat transfer resistance.
Reading:
H&R Section 12.3.2, 12.5
Global material and energy balances for catalyst pellet
Internal heat transfer resistance
Adiabatic temperature rise (coupled conduction and
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer Modeling
and Simulation of
Chemical Engineering Systems
Lecture 20
November 11, 2014
Review: 2nd order ODE Example
2nd order ODE requires
two boundary conditions
Note that the second derivative can be written as,
Insertin
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer Modeling
and Simulation of
Chemical Engineering Systems
Lecture 19
November 6, 2014
Eulers Method
Use the tangent line (slope at xn)
to calculate the solution at xn+1
Cant project the solution to far
along the tangent l
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer
Modeling and Simulation of
Chemical Engineering Systems
Lecture 2 August 28, 2014
Evolution of computers
Abacus representing the number is 1,532,786
Evolution of computers
Slide Rule
Evolution of computers
EDVAC(Electroni
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer
Modeling and Simulation of
Chemical Engineering Systems
Lecture 3 September 2, 2014
Bits & Bytes
Start with integers: Any integer (1, 2, 3, 4, 10, etc.) can be represented as
where di represents the integers up to B1 and
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer Modeling
and Simulation of
Chemical Engineering Systems
Lecture 22
November 18, 2014
Symbolic Math
Symbolic mathematics tools allow you to analytically
perform differentiation, integration, simplification,
transforms, an
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer Modeling
and Simulation of
Chemical Engineering Systems
Lecture 24
December 2, 2014
Final Exam: Matrix Arithmetic operators:
+ Plus.
X + Y adds matrices X and Y. X
and Y must have the same
dimensions unless one is a scala
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer Modeling
and Simulation of
Chemical Engineering Systems
Lecture 21
November 13, 2014
Statistics
Whenever analyzing data, you have to compute statistics
> scores = 100*rand(1,100);
Builtin functions
mean, median and mo
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer Modeling
and Simulation of
Chemical Engineering Systems
Lecture 15
October 21, 2014
Numerical differentiation and integration
Matlab has a few functions that can be used in obtaining finite
approximations for differentia
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer Modeling
and Simulation of
Chemical Engineering Systems
Lecture 16
October 23, 2014
Numerical Integration
Lets numerically solve the following double integral
2
ysin(x) xcos(y)
dxdy
0
Now similar to the 1d integrals
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer
Modeling and Simulation of
Chemical Engineering Systems
Lecture 6 September 11, 2014
Matlab vectors and matrices
An ordered collection of numbers separated by commas or spaces
can be defined in MATLAB as an array or vect
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer Modeling
and Simulation of
Chemical Engineering Systems
Lecture 10 September 25, 2014
Midterm Review
Write a simple Matlab Script
A script is
a collection of commands executed in sequence
written in the MATLAB editor
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer
Modeling and Simulation of
Chemical Engineering Systems
Lecture 7 September 16, 2014
Matrix math review
The transpose operators turns a column vector into a row vector and
vice versa>
> a = [1 2 3 4+i]
> transpose(a)
> a'
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer Modeling
and Simulation of
Chemical Engineering Systems
Lecture 14
October 16, 2014
Curve fitting using polynomials
Experimental data is often accompanied by noise
Athough all control parameters (independent variables)
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer Modeling
and Simulation of
Chemical Engineering Systems
Lecture 13
October 14, 2014
Polynomials
Many functions can be well described by a highorder polynomial
MATLAB represents a polynomials by a vector of coefficients
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer Modeling
and Simulation of
Chemical Engineering Systems
Lecture 12
October 9, 2014
Plot options
Can change the line color, marker style, and
line style by adding a string argument
> plot(x,y,k.);
color
marker line style
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer
Modeling and Simulation of
Chemical Engineering Systems
Lecture 5 September 9, 2014
Matlab vectors and matrices
An ordered collection of numbers separated by commas or spaces
can be defined in MATLAB as an array or vecto
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer Modeling
and Simulation of
Chemical Engineering Systems
Lecture 11
October 7, 2014
Variable Scope in Matlab
he scope of a variable is generally defined as the range of
nctions that have access to the variable to set or mo
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer
Modeling and Simulation of
Chemical Engineering Systems
Lecture 8 September 18, 2014
Basic Plotting
Example:
> x=linspace(0,4*pi,10);
> y=sin(x);
Plot values against their index
> plot(y);
Usually we want to plot y ver
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer Modeling
and Simulation of
Chemical Engineering Systems
Lecture 9 September 23, 2014
Nested functions
A nested function is a function that is completely contained
within a parent function (the actual program resides in t
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
CHE 2162 Introduction to Computer
Modeling and Simulation of
Chemical Engineering Systems
Lecture 4 September 4, 2014
IEEE 754 Standard
Single precision (32 bits total):  about 7 digits accuracy
(222 produces 7 digits)
IEEE Single precision Real exponen
Introduction to Computer Modeling and Simulation of Chemical Engineering Systems
CHEMICAL E ChE2162

Fall 2014
1. Class A had 30 students who received an average test score of 78, with
standard deviation of 10. Class B had 25 students an average test score of
85, with a standard deviation of 15. We want to know if the difference in
these averages is statistically