Spring 2013
ChE 310 Computational Methods for Chemical Engineers
171 Durham Hall & Sweeney 1123
TR 2:10pm 3:30pm
(110 Points Total)
Homework Set #3 Due 5:00pm Tuesday, February 12, 2013
hw3.1 Matrix M
ChE 310 Computational Methods for Chemical Engineers
171 Durham Hall & Sweeney 1123
TR 2:10pm 3:30pm
(80 Points Total)
Spring 2013
Homework Set #2 Due 5:00pm Tuesday, February 2, 2013
hw2.1 Write an m
Spring 2013
ChE 310 Computational Methods for Chemical Engineers
171 Durham Hall & Sweeney 1123
TR 2:10pm 3:30pm
(110 Points Total)
Homework Set #3 Due 5:00pm Tuesday, February 12, 2013
hw3.1 Matrix M
ChE 310 Computational Methods for Chemical Engineers
171 Durham Hall & Sweeney 1123
TR 2:10pm 3:30pm
(80 Points Total)
Spring 2013
Homework Set #2 Due 5:00pm Tuesday, February 2, 2013
hw2.1 Write an m
Spring 2013
ChE 310 Computational Methods for Chemical Engineers
171 Durham Hall & Sweeney 1123
TR 2:10pm 3:30pm
(30 Points Total)
Homework Set #5 Due 5:00pm Friday, March 1, 2013
hw5.1 Redo hw4_1f, t
ChE 310 Computational Methods for Chemical Engineers
171 Durham Hall & Sweeney 1123
TR 2:10pm 3:30pm
(100 Points Total)
Spring 2013
Homework Set #4 Due 5:00pm Tuesday, February 19, 2013
hw4.1 Multicom
Spring 2013
ChE 310 Computational Methods for Chemical Engineers
TR 2:10pm 3:30pm
171 Durham Hall & Sweeney 1123
January 15, 2013
Class Meeting #1
Matlab Matlab Matlab
Save each problem using the com
Spring 2013
ChE 310 Computational Methods for Chemical Engineers
TR 2:10pm 3:30pm
171 Durham Hall & Sweeney 1123
Course Instructor/Homework-Grader E-mail: [email protected]
Please use this email
clear;
load hw4_1;
x
y
X
Y
Z
= %mxn interpolated x values
= %mxn interpolated y values
=
=
=
H_downsampled = H(1:8:emd); %take elements
0ont believe i need to downsample data
%use interp1 function for
% ic7_1a : plot the flash tank problem and solve with fzero
z = [0.8345 0.0046 0.0381 0.0163 0.0050 0.0074 0.0287 0.0220 0.0434];
K = [3.0900 1.6500 0.7200 0.3900 0.2100 0.1750 0.0930 0.0650 0.0360];
clear, clc;
function result = matrix_maker(m,n)
m = input('Input the number of rows in the matrix');
n = input('Input the number of columns in the matrix');
if m <= 0 or n <= 0
error('Error, number mu
Spring 2013
ChE 310 Computational Methods for Chemical Engineers
171 Durham Hall & Sweeney 1123
TR 2:10pm 3:30pm
(135 Points Total)
Homework Set #7 Due 5:00pm Friday, March 15, 2013
hw7.1 Setting up a
Spring 2013
ChE 310 Computational Methods for Chemical Engineers
171 Durham Hall & Sweeney 1123
TR 2:10pm 3:30pm
(150 Points Total)
Homework Set #5 Due 5:00pm Friday, March 8, 2013
hw5.1 A 1 L batch r
1. How would you go about re-writing the following expression into its root-finding form
for use with Excel macros?
2
x +3 x=tan (x)+
a.
x 2+3 xtan (x)=
b.
x 2+3 xtan (x) =0
c.
x +3 x +tan ( x)+ =0
2
1. Using Nave Gaussian Elimination, how would you solve L d = b and U x = d?
a. Forward substitution for L d = b and backward substitution for U x = d
b. Backward substitution for L d = b and forward
1. True or False: An M-file includes both script files and function files
a. True
b. False
2. Which of the following is true regarding loops?
a. Only for loops require the end syntax to execute a loop
1. When using the macro-enabled solver in Excel to solve non-linear equations such as the
Redlich-Kwong Equation of State to find the volume:
Which of the following should be set equal to zero in orde
1. For cell arays of strings, which punctuation should be used?
a. ( )
b. [ ]
c. cfw_
d. < >
e. None of the above
2. In creating a function_handle, which of the following is formatted correctly?
a. F
Spring 2013
ChE 310 Computational Methods for Chemical Engineers
171 Durham Hall & Sweeney 1123
TR 2:10pm 3:30pm
(30 Points Total)
Pre-meeting Exercise for Class Meeting #9 at 2:10pm Tuesday, February
Spring 2013
ChE 310 Computational Methods for Chemical Engineers
TR 2:10pm 3:30pm
171 Durham Hall & Sweeney 1123
(50 Points total)
Challenge Problem #1
ch1.1 How does fzero Work?
Dekker's Method for S
function [r, theta] = cart2polar(x,y)
n = length(x);
m = length(y);
if n ~= m
error('n must equal m')
end
r = zeros(1,lenth(x);
theta = zeros(1,length(y);
for i = 1: n
r(i) = sqrt(x(i).^2 + y(i).^2);
Lecture 13 October 7, 2010
Agenda:
Solving Non-linear functions: f(x) = 0 (root finding)
Closed (Bracketing) Methods
o Bisection (talked about this last time)
o False Position
Open Methods (non-bra