DOC PREVIEW
MIT 10 34 - Implicit Ordinary Differential Equation

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Implicit ODE Solvers Stiff Solvers Shooting Root-finding (Newton, Broyden)10.34, Numerical Methods Applied to Chemical Engineering Professor William H. Green Lecture #14: Implicit Ordinary Differential Equation (ODE) Solvers. Shooting. Implicit ODE Solvers dy/dt = -y y(t=0) = 1 ytrue = e-twith explicit Euler G = F(Y(t)) for this case, instability if Δt > 1 with implicit Euler G = F(Y (t+Δt)) For Δt = 2, )Δnewt*F(YYYoldtnewtt+=Δ+ ynew = 1+2(-ynew) 1 1/31/4x 2 4 xtrue 3ynew = 1 Î ynew = 1/3 e-2=ytrue ynew = 1/3 + 2(-ynew) 3ynew = 1/3 Î ynew = 1/9 e-4=ytrue Figure 1. Comparison of implicit Euler to true value. Accuracy low, but Implicit Euler does not become numerically unstable. Explicit Euler decays too fast. Implicit Euler decays too slow, but it allows one to use larger timesteps. Stiff Solvers Stiff: tf – t0 >> Δtmax because of instability because of accuracy Explicit |λ|maxΔt ≤ 1 for stability Stiff solvers: ode15s Å usually better ode23s Å super stiff Non-stiff ode45 Å explicit method Example: CO + ½O2 Æ CO2 In the presence of H2, H2O OH + CO Æ H + CO2 H + O2 Æ OH + O 1/λOH ~ 10-9 s 1/λCO ~ 1 s Δtexplicit ≤ 10-9 s 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].9 orders of magnitude difference in time scales In diffusion problems λfast/λslow ~ Nmesh2 ~ 1/(Δx)2 so a fine mesh makes the problem very stiff. Shooting Figure 2. |-------------------| x y = height of cannonball Y(t=0)= ⎟⎟⎠⎞⎜⎜⎝⎛guessknownYY00Yi(tf) = Yspecial Y(tf) Å ode15s(…,Yos,…) Root-finding (Newton, Broyden) g(Yguess) = 0 g = Yi(tf) – Yspecial Yi(tf) Å ode15s(…, Yguess,…) Ybestguess = bisect(@g, [Ylowguess,Yhighguess],tol) |g(Ybestguess)|<ftol|Ybestguess – Ytrueguess| < xtol function error = g(Yguess) Y0 = […, Yguess] Yf = ode15s(@F,Yo,tf,tol,options) error = Yf(nspecial) - Yspecial inside ode’s events Î stop integrating when something happens 10.34, Numerical Methods Applied to Chemical Engineering Lecture 14 Prof. William Green Page 2 of 2 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


View Full Document

MIT 10 34 - Implicit Ordinary Differential Equation

Documents in this Course
Load more
Download Implicit Ordinary Differential Equation
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Implicit Ordinary Differential Equation and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Implicit Ordinary Differential Equation 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?