10 34 Numerical Methods Applied to Chemical Engineering Professor William H Green Lecture 26 TA led Review Singular Value Decomposition Amxn Umxm Smxn VnxnT U U 1 UT V 1 VT 0 1 2 n 0 0 S VT A U S VT 1 0 1 1 S 1 0 UT A UTU S VT 0 1 1 treat it as zero 0 0 1 2 1 3 UT A I S VT V S 1UT A I S VTV S 1 A x b x A 1b A 1 V S 1UT x V S 1UT b Ordinary Differential Equations dxnm dt Fn x x x to F x t dt t to Trapezoidal Rule f3 f2 f1 to t1 t2 Error O t3 xN O t2 Figure 1 Integration by the Trapezoidal Rule Simpson s Error Error O t5 xN O t4 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 Romberg Method Richardson Extrapolation tn Ftrue tn Ftrue 4 1 F 2 N F N O t 3 3 3 Ftrue f t t0 tn t0 t0 f t dt F N C t 2 2 t f t dt F 2 N C 2 Figure 2 Integration by the Romberg Method N t 2N t 2 ODE Solvers Explicit Euler xn 1 xn F xn h O h2 Runge Kutta xn xn 1 Figure 3 Runge Kutta Integration of differential equations Runge Kutta order 5 6 function evaluations per time steps use intermediate value to calculate Ode45 uses R K 6 function evaluation Stiff differential equation x a e t b e 1000000t rate of time change are 1 000 000 times different 10 34 Numerical Methods Applied to Chemical Engineering Prof William Green Lecture 26 Page 2 of 5 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 Figure 4 Example solution to differential equation must use many time steps if big steps are used you will oscillate around the solution dx c x dt t 2 max Must use Implicit Method Predictor Corrector Method polynomial tn k tn k 1 tn tn 1 Figure 5 Predictorcorrector method DAE dx M X F X dt f x 0 0 0 ode23t ode15i Optimization minx f x g x 0 i 1 ne h x 0 i 1 ni CONSTRAINTS 10 34 Numerical Methods Applied to Chemical Engineering Prof William Green Lecture 26 Page 3 of 5 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 If no constraints f x 1 f Gradient Method Vf x 2 f x n If no gradient given fminsearch Figure 6 Gradient method contours Conjugate gradient method As you get closer to the minimum Newton s Method gives good convergence Vxn Hn 1 Vfn 2 f 2 x1 H 2 f x n x1 2 f x1 x 2 2 f x1 x n 2 f 2 x n No Constraints Broyden Fletcher Goldfarb Shanno Method BFGS With Constraints Vf Vgi x Lagrangian ne Vf i g i x ne L x f i 1 VxL 0 g x i 1 i i V L 0 L x f igi x 1 2 i gi x 2 KKT 10 34 Numerical Methods Applied to Chemical Engineering Prof William Green Lecture 26 Page 4 of 5 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 ne L x k f x ni g x k h x i 1 i VL 0 gi x 0 hi x 0 ki 0 i i i i 1 hjkj 0 Sequential Quadratic Programming SQP minx f x cm x sm 0 for equality constraints sm 0 for nonequality constraints sm 0 Boundary Value Problems 2 2 2 vx vy vz D 2 2 2 S x y z y z x x xn n n 1 x n x n 1 2 x 2 O x Types of BC xo o x xn xn n 1 2 n n 1 2 x 3 o 4 1 2 0 2 x 10 34 Numerical Methods Applied to Chemical Engineering Prof William Green Lecture 26 Page 5 of 5 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
View Full Document
Unlocking...