ChE 4190
Fall 2015
Lecture notes  November 11
Topic:
Nonadiabatic batch reactor
Reading:
H&R  Sec 10.2
Example calculations
Isothermal
Separation of variables
ODE solver
Adiabatic
Separation of var
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
Aver
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 resista
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
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+
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 comp
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 repres
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 diffe
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
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 21
November 13, 2014
Statistics
Whenever analyzing data, you have to compute statistics
> scores = 10
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
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
ys
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
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 comman
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 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 14
October 16, 2014
Curve fitting using polynomials
Experimental data is often accompanied by noise
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
MATL
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 s
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
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 o
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 agains
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
wi
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
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 kno