chemical engineering 2450 - university of utah
TRANSCRIPT
Chemical Engineering 2450
Numerical Methods Applications in Chemical Engineering
1 Introduction.key - September 3, 2014
Administrative StuffEmail - I will send email to the class via your umail account.
Text book - a good reference for more depth than we will typically cover...
Learning - a joint endeavor.
Homework • Assignments posted on course web site.
• Electronic submission
• Working together is good - Copying & plagiarism is very bad.
• Do not procrastinate, and do not get behind!
Office Hours - any time or by appointment • 360 INSCC, 585-1246
Course website: http://www.che.utah.edu/~sutherland
ICC (MEB 2285) - computer lab access.
2 Introduction.key - September 3, 2014
ChEn 1703
PerspectiveFundamental
conservation lawsApproximations
& models
Algorithm (set of steps to
obtain an answer)
Solve by hand (pencil & paper,
calculator)
Solution
Numerical tools (help generate plots, calculate numbers)
MATLAB
Excel
Ch En 2450
Other ChEn courses
3 Introduction.key - September 3, 2014
Survival TipsBrush up on your Matlab skills NOW! • This class uses Matlab extensively, but I won’t spend much time in class teaching it.
Start on homework early. This is not high school…
Review class notes prior to lecture. Review them again after class.
Before doing homework, rework all examples that we did in class.
Start on homework early!
If you are stuck, get help! • I am happy to answer your questions, but I won’t do your homework for you.
• Frustration does not help you learn...
• The class wiki page is a good resource for Matlab (and some numerical analysis also).
• Ask your classmates for tips. Discuss problems with each other.
Take advantage of discussion/help sessions
4 Introduction.key - September 3, 2014
Homework ThoughtsGetting “an answer” is not the goal.
• Critically thinking about the answer is the goal.
• Answers ⇒ insight & understanding.
Writing “code” is not the goal • Getting answers to get insight is the goal.
• Computers are just tools to help us get insight. The means, not the end!
How you present your results is frequently as important as the result itself!
• Interpretation, with supporting data, is key & why engineers make $
• Plots must always be labelled.
• Numbers without units are dangerous (sometimes meaningless). ‣Mars rover
5 Introduction.key - September 3, 2014
Numerics - Some IssuesSignificant Digits
• How well do you know the inputs to the problem? This determines how well you know the outputs!
Precision/Accuracy • How well can we represent a number on the computer? (examples: π, 1, 1/3) Errors
• Iteration error: ‣ Arises from a “guessed” solution
‣ Can be reduced by subsequent iterations.
• Approximation errors: ‣ Arises from solution of an approximate representation of the original problem. ‣ Example: interpolation.
‣ Can be reduced by changing our approximate representation.
• Roundoff errors: ‣ Arise from finite precision.
‣ Example: subtract two very large numbers: 10,000,001-10,000,000 (assume 8 digits of accuracy).
Hoffman §0.6
6 Introduction.key - September 3, 2014
Approximation Error
6:00 AM 50 ℉
Noon 80 ℉
What was the temperature at 9:00 AM?
7 Introduction.key - September 3, 2014
Iteration ErrorThis dictionary has 500 pages in it.
What page is “muse” on?“m” is the 13th letter in the alphabet (26 letters)...
8 Introduction.key - September 3, 2014
MATLAB RefresherMATLAB: Matrix Laboratory Defining variables:
• a=1; b=[1 2 3]; c=[2 3 2; 2 4 6]; d=[1 2 3]’; e=[1; 2; 3];
Working with arrays: • A*B - matrix multiplication ‣ Be sure that you know the “rules” for matrix multiplication. (Number of columns
in A must be equal to number of rows in B).
• A.*B - elemental multiplication
Some commands you should familiarize yourself with: • Building arrays: ones, linspace, zeros, :
• loops & logic: for, while, if/then/else
http://www.che.utah.edu/~sutherland/wikihttp://www.che.utah.edu/~sutherland/?page_id=141
9 Introduction.key - September 3, 2014
A Word to the WiseWhen formulating a solution to a problem:
1. Clearly define your knowns/unknowns
2. Write down a solution procedure/algorithm (steps to obtain unknowns given the knowns)
- When possible, separate/compartmentalize various aspects of the problem.
- Test the solution procedure for a simple test problem by hand.
3. Plan your numerical implementation
- Turn separated aspects into functions if necessary. Test each function on a simple example.
- Test your code on a simple example - compare with your “hand” calculation
10 Introduction.key - September 3, 2014