| Current Homework | Today's Class Handouts |
UMCP logo

Welcome to Nam Sun Wang's ...

ENCH250

Computer Methods in Chemical Engineering

Summer 2006

ENCH250 logo

Table of Contents


Class Syllabus

Class Syllabus contains information on textbooks, gradings, etc. A separate document describes the general criteria for grading problems. Be sure you understand the Policy on Academic Integrity within the Chemical & Biomolecular Engineering Department.


Schedule

WeekDateTopics
1 7/17 Syllabus, Survey, Pictures, Computer Hardware (various major components), ASCII, Bits & Bytes, Number System, Base Conversion
7/18 Operating Systems (DOS, Windows, Unix, Mac) Redirection, File Transfer (ftp), Remote Computer Login (telnet), Internet (www, http, IE), E-Mail, Internet Relay Chat (irc)
7/19 HTML
7/20 Integration, Trapezoidal Rule, Error, Accuracy, Iteration, Spreadsheet Fundamentals
7/21 Quiz #1, Matrix, Ax=b, Handling vectors/matrices in Spreadsheet
2 7/24 Gaussian Elimination, Matrix Inverse
7/25 VBA Syntax (Variable Types, Assginment, Algebraic/Logic Operators, I/O, SUB/FUNCTION),
7/26 VBA Syntax: Flow Control/Branching with IF, FOR-Loop
7/27 f(x)=0: Algorithm & One-Dimensional Examples
7/28 Quiz #2, f(x)=0: One-Dimensional Examples
3 7/31 f(x)=0: Multidimensional Examples with Excel
8/01 f(x)=0: Multidimensional Examples with NR
8/02 Mathcad: Basic Syntax & Overall Structure
8/03 Mathcad: Application
8/04 Quiz #3, Mathcad: Application
4 8/07 Mathcad: Symbolic Computation, Data Fitting, Regression
8/08 Linear Regression: Algorithms & Examples
8/09 Nonlinear Regression: Algorithms & Excel Examples
8/10 Nonlinear Regression: Algorithms & Mathcad Examples
8/11 Quiz #4,
5 8/14 Matlab: Matrix, Syntax
8/15 Matlab: I/O, Flow Control, Loop
8/16 Matlab: Functions
8/17 ODE: Algorithms & Exel/Mathcad Examples
8/18 Quiz #5, ODE: Matlab Examples
6 8/21 ODE: Boundary Value Problems Algorithms & Examples
8/22 Chemcad
_.o8o.________ We Are Here Now! ________.o8o._
8/23 Chemcad
8/24 Semester Review; Teaching Evaluation
8/25 Final Examination
   
  
 


Homework Statements & Solutions

DueHomeworkSolutions
7/20Homework #1 See Homework Statement
7/24Homework #2  
7/27Homework #3  
7/31Homework #4  
8/03Homework #5  
8/07Homework #6  
8/10Homework #7  
8/14Homework #8  
8/17Homework #9  
8/21Homework #10  
8/24Homework #11  
    
  
 


Class Handouts & Lecture Notes

Week #1
Week #2
Week #3
Week #4
  • Linear Regression
  • Slope & Intercept
  • Derivation of Intercept and Slope Equations
  • I have prepared a series of notes on linear regression. The first two sections are suitable for ENCH250.
    • Multivariate Regression Series (Part 1, Linear Least Squares Regression)
    • Multivariate Regression Series (Part 2, Multiple Least Squares Regression)
  • Read further only if you are truly motivated to learn more about regression.
    • Multivariate Regression Series (Part 3, Principal Component Regression)
    • Multivariate Regression Series (Part 4, Partial Least Squares Regression)
    • Multivariate Regression Series (Part 5, Simple 2-Dimensional PLS Example)
    • Multivariate Regression Series (Part 6, Perceptrons)
  • Excel Examples of Linear Regression
  • Mathcad Examples of Linear Regression
    • Linear Regression ("intercept" & "slope" Functions) /w Few Data Points
    • Linear Regression ("intercept" & "slope" Functions) /w Data from a File
    • Linear Regression of Data Read from regress.prn with the Normal Equation
    • Linear Regression of Data Entered Directly in Worksheet with Normal Equation
    • Linear Regression with "linfit" Function
    • Linear Regression (Incremental) of Steam Table Data steam.prn with the Normal Equation
    • Linear Regression of Steam Table Data
  • Nonlinear Regression
  • Excel Examples of Nonlinear Regression
    • Nonlinear Regression (Exponential Decay) by Minimizing sse
    • Nonlinear Regression (Antoine Equation) by Minimizing sse
  • Mathcad Examples of Nonlinear Regression
    • Nonlinear Regression (Exponential Decay)
      • Snapshot of Mathcad Screen (regress9.gif)
      • Mathcad File (regress9.mcd) -- Convergent behavior depends on versions; see comments at end of worksheet.
    • Ditto, with "Minerr" Function
    • Ditto, with "genfit" Function
    • Ditto, with "Minimize" Function, starting from v8
    • Nonlinear Regression of Steam Table Data (Two Nonlinear Terms)
    • Ditto (Four Nonlinear Terms)
  • Quiz #4 & Solution
Week #5
  • Matlab
  • Matlab Tutorials
  • Matlab Primer by Kermit Sigmon (ported by Nam Sun Wang)
  • Matlab Quick Search (A List of Commands Sorted by Category)
  • Major Matlab programming elements:
    • Basic syntax and rules (matrix, array, scalar)
    • Turn on recording with diary
    • Input/Output with input, disp, fprintf, fopen, fclose
    • Input/Output with save, load
    • Assignment with algebraic expressions involving ( + - * / ^ ), e.g., sum=sum+1
    • Plotting with plot, axis, title, xlabel, ylabel, text
    • Looping with for ... end
    • Conditional check with if ... else ... end and logical expression involving ( == ~= > >= < <= & | ~ )
    • function statement; global
  • Matlab Examples
    • Matlab: Temperature Conversion
      • MATALB M-Script File (temp.m)
    • Matlab: Solve Ax=b with Matlab
    • Matlab: Polynomial Roots
    • Matlab: Read a series of data sequentially from an ASCII file read1.m
    • Matlab: Load data from a file to a single matrix read2.m
    • Matlab: Write a series of data sequentiallly to an ASCII file write.m
    • Matlab: IF-THEN-ELSE
    • Matlab: function (addition and subtraction)
    • Matlab: Factorial function.
    • Fortran (passing by reference) & Matlab (passing by value)
    • Matlab: Passing by Value between functions
    • Matlab: Do not place function argument in "global"
      • Main M-Script File (double.m) -- Bad example.
      • Main M-Script File (doubleok.m) -- Good example.
    • Matlab: Quadratic Equation Solver in Matlab
    • Matlab: Integration with QUAD & QUAD8
  • MATLAB Examples of Nonlinear Algebraic Equation
  • MATLAB Examples of Linear Regression:
    • Quick-Dirty Example of Linear Regression in Power Series -- Fit f(x)=1/(x+1) with "polyfit"
    • Quick-Dirty Example of Linear Regression in Power Series -- Fit f(x)=1/(x+1) with "\"
    • Quick-Dirty Example of Linear Regression -- Fit f(x)=1/(x+1) with a=(X'X)-1X'y
    • Linear Regression in Power Series (Read Data from Keyboard/File)
  • MATLAB Examples of Nonlinear Regression:
    -------------------------------------------------------------------------
  • ODE -- Initial Value Problem
  • Numerical Solution of ODE with Euler & Runge-Kutta
  • Transform into First-Order ODEs
  • Excel Examples of ODE
  • Mathcad Examples of ODE
    • Ordinary Differential Equation -- Non-isothermal Reactor
    • Ordinary Differential Equation -- One Dimensional Case
    • Ordinary Differential Equations -- Initial Value Problem (Predator-Prey Dynamics)
    • Ditto -- Simplified
  • MATLAB Example of ODE
      Ordinary Differential Equation -- Non-isothermal Reactor
  • Quiz #5 & Solution
Week #6
  • ODE -- Boundary Value Problem
  • Excel Example of Boundary Value Problems
    • ODE Boundary Value Problem (Concentration Profile in a Spherical Catalyst Particle.)
  • Mathcad Examples of Boundary Value Problems
    • Ordinary Differential Equations -- Boundary Value Problem (Bessel's Function by Trial & Error Shooting Method)
    • Ditto (by "sbval" with dummy elements)
    • Ditto (by "sbval" with 1X1 inner-product vectors)
    • Ditto (by "sbval" without dummy elements)
  • Chemcad
  • Chemcad Overview by Vivek Dwivedi
  • Chemcad Tutorial
  • Semester Review
  • Final Examination & Solution
Postscript
Major mathematical packages that we did not cover:
 


List of Students
Click here to match names with faces for the entire class. Click on the last name for a small (100X100) picture; click on the first name for a medium (200X200) picture.


Return to Prof. Nam Sun Wang's Home Page
Computer Methods in Chemical Engineering
Forward comments to:
Nam Sun Wang
Department of Chemical & Biomolecular Engineering
University of Maryland
College Park, MD 20742-2111
301-405-1910 (voice)
301-314-9126 (FAX)
e-mail: nsw@umd.edu ©2006 by Nam Sun Wang
UMCP logo