Problem Solving

advertisement

10.34, Numerical Methods Applied to Chemical Engineering

Professor William H. Green

Lecture #35: Problem Solving Summary and Review.

Problem Solving

Well-Posed Problems

• In reality, you define the problem

Example: At Exxon, Professor Green was told that the “lubricant gums up in the engine.”

Had to take ill-posed problem and transform to a well-posed problem.

• Could solve kinetics

• Could solve thermodynamics

RECOGNIZE WHAT TYPE OF PROBLEM Æ Rewrite equations in standard form

• Algebraic equations o Linear o Non-linear

• Differential eq uations o ODE

ƒ Initial Value Problems

ƒ Boundary Value Problems o PDE

• Optimization

• Stochastic Simulations

Estimate SOLUTION

• REALITY CHECK!

• Set constraints for optimization (i.e. least-squares)

• Good initial guess

• At least think about UNITS!

Write some MATLAB Æ Run Computer Æ SOLUTION

• (OR) Error or warning message

Check if solution works!!

• is reasonable to spend as much time checking solution as obtaining it o e.g. have two different programs written by two different people

• How important is it that you are right?

Cite as: William Green, Jr., course materials for 10.34 Numerical Methods Applied to Chemical Engineering, Fall

2006. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD

Month YYYY].

• Even if solution works, does not guarantee solution will happen

Sensitivity Analyses – check for ill-conditioning

• Numbers from numerical solution will not match experiment because input parameters have uncertainty

• Usually at least 1% error in measurements

• If

(solution)

(input parameters )

sensitive to 1% error, ill-conditioning

M·x ≈ b Æ use SVD

• once you get a solution, do Taylor expansion, linear equations, check condition number cond(M)

Models v. Data

Stochastics

• Metropolis Monte Carlo

• Gillespie Kinetic Monte Carlo

Y data

(x) Y model

(x , θ ,q) find θ best min χ

2 ( θ ) is best

) small enough? not going to adjust

χ

2 = 14

χ

2 = 5

θ

2

χ

2 = 2

θ

1

θ

( θ best

1 best ± δθ

1

, θ

2 best ± δθ

2

)

Figure 1.

Diagram showing search for best θ .

Start with messy equations……… differential equations

1) Discretize Æ F(x) = 0

2) Taylor series Æ Linearize

10.34, Numerical Methods Applied to Chemical Engineering

Prof. William Green

Lecture 35

Page 2 of 3

Cite as: William Green, Jr., course materials for 10.34 Numerical Methods Applied to Chemical Engineering, Fall

2006. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD

Month YYYY].

J · ∆ x = -F Solve linear equations. Then may discretize a different way to see whether we get the same answer.

Newton’s method has best convergence close to minimum.

Computer Programming (Key to MATLAB)

• Reusability (avoid writing too much code)

• HEADER to function/program: inputs/outputs/function description (what it does)

10.34, Numerical Methods Applied to Chemical Engineering

Prof. William Green

Lecture 35

Page 3 of 3

Cite as: William Green, Jr., course materials for 10.34 Numerical Methods Applied to Chemical Engineering, Fall

2006. MIT OpenCourseWare (http://ocw.mit.edu), Massachusetts Institute of Technology. Downloaded on [DD

Month YYYY].

Download