{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ProblemSet1 - ChE 101 2012 Problem Set 1 1 Computational...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ChE 101 2012 Problem Set 1 1. Computational problem of the week: Every week, we will assign one problem designed to increase your exposure to numerical methods, improve your algorithmic thinking, and get you familiar with Matlab (you’ll thank us once you get to 103C, 126, and 163). This week we address perhaps the most important topic in the study of chemical kinetics: the solution of nonlinear ordinary differential equations. Stripped of its physical richness, all of kinetics can be reduced to solving the most general initial value problem of the form y 0 ( t ) = f ( t, y ) , y ( t 0 ) = y 0 (1) Here, y is a vector of coupled variables { y 1 , y 2 , ..., y n } , which can include species concen- trations, reactor temperature (for non-isothermal problems), etc. Unfortunately, Equation 1 cannot be solved analytically except for very special cases in which the equation is either separable or can be made separable with an integrating factor, so we would like to develop numerical methods to obtain approximate solutions with arbitrary accuracy. (a) Euler’s method: The simplest of all numerical integrators, and probably a method you’ve seen in high school calculus. If we wish to integrate Equation 1 from t 0 up to t f , then we divide up the interval [ t 0 , t f ] into n segments with length h Δ t/n , where Δ t = t f - t 0 . Along each segment, we approximate the function y ( t ) by a straight line, with slope given by f ( t, y ) evaluated at the preceding mesh point. As such, Euler’s method can be viewed as a linear interpolation scheme for ODEs, with the simple updating rule y i + 1 = y i + h · f ( t i , y i ) i. Implement Euler’s method as a Matlab function that takes in a function handle for the right hand side of Equation 1, the initial and final time points t 0 and t f , the number of steps n , and the vector y 0 of initial conditions. The function should return a matrix containing the values of y ( t ) at every mesh point in the simulation. ii. To see how this method performs on a real problem, consider the first-order, re- versible isomerization A k f GGGGGGB FGGGGGG k b B A. Write out the system of coupled differential equations governing the kinetics of this reaction in a batch reactor. B. Solve the system analytically with the initial conditions c A (0) = c A, 0 and c B (0) = c B, 0 . Confirm that your solution is consistent with thermodynamic equilibrium for the two species. Show all your work!
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}