Numerical Applications to Differential Equations
Numerical Applications to Differential Equations MA 302
Popular in Course
Popular in Mathematics (M)
verified elite notetaker
This 7 page Class Notes was uploaded by Braeden Lind on Thursday October 15, 2015. The Class Notes belongs to MA 302 at North Carolina State University taught by Robert White in Fall. Since its upload, it has received 7 views. For similar materials see /class/223678/ma-302-north-carolina-state-university in Mathematics (M) at North Carolina State University.
Reviews for Numerical Applications to Differential Equations
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 10/15/15
Lesson 15 Oregonator Chemical Reactions and ode15s 151 Applied Problem The chemical reaction with bromous acid bromide ion and cerium ion exhibits a remarkable chemical attributes which oscillate with changes in color and structure The rates of changes of the concentrations are very large and have spikes similar to those in the Van der Pol equation solution Such systems are called stiff and require special numerical methods The Matlab command odedemo illustrates this see chm9ode and other stiff differential equations and two stiff solvers called ode23s and ode15s 152 Differential Equation Model The chemical reaction can be described in five stages with known reaction rates Upon suitable time and concentration scaling this is modeled by three coupled differential equations Let s 7727 w 161 q 837510A6 y10 4yz0 11 and y30 4 W syz y1yz yl q ylz yZ39 3 2 yl 3 2 f Y3S and y339 Wyl Y3 Matlab s ode23s and ode15s can be used to solve such systems As a first step in the study of this system we consider the steady state solutions which are defined by all three derivatives being set equal to zero so that 0 SyZ yl 3 2 f yl q ylz 16101 32 Y3 0 3 2 yl 3 2 f Y3S 16201 32 Y3 and 0 WY1 39 Y3 f3Y1 Y2 Y3 The three positive steady state solutions are yf yJ 48818 and yzquot 99796 These may be found by using the symbolic Matlab command solve as follows EDU y1y2solve39y2 y1y2y1 qy1y103939 y2 y1y2y1039 y1 0l 12qqqA28IIA12l 12qIIqA28IIA12l y2 01 114q 14qA28qA12 114q14q 28q 12 The Jacobian of f1 f2 f3 is flyl fly2 fly3 SyZ 1 1231 S1 Y1 0 J fZyl fZyz fly y2s l y1s ls f3y1 f3Y2 f3Y3 W 0 W The eigenvalues of J evaluated at the steady state solutions are easily found by using the Matlab command eig The following code is in the Matlab mfile called 0regjacm y1 48818 y2 99796 y3y1 s 7727 w 161 q 837510A 6 J s y21 q2y1 s1 y1 0 y2s 1y1s 15 w 0 w eigJ The ouput from the execution of this le shows some large positive and negative eigenvalues so that the steady state solutions are unstable and the system is stiff near the steady state solutions EDU oregjac ans 257146 187473 00013 153 Method of Solution We will use Matlab s stiff solver called ode15s This is much more sophisticated than the simple Eulertrapezoid method that was used a previous lesson However its formulation is somewhat similar to the implicit nature of each time step in the Euler trapezoid method Further details about this method are described in the Matlab s helpdesk also see the link to the ODE suite on the homepage for Math 302 154 Matlab Implementation The mfiles for this system are called yporegm and oregm In the first calculation we used the final time tf 300 and the second calculation used tf 1000 so as to show the oscillations over three periods The graph is for the scaled concentrations versus time The oregm file uses semilogy graphing and so it reveals very significant spikes in the solutions function yporegyporegty yporegu 7727y2 y1y2y1 83751OA6 Y1 y1 yporeg2 y2 y1y2y37727 yporeg3 161y1 y3 yporeg yporegm yporeg2 yporeg3139 your name your student number lesson number clear tf 1000 yo 4 11 4 t y ode15s yporeg 0 tfyo semilogyty 1 ty 2 ty 3 title your name your student number lesson number xlabel time ylabel solutions one two and three your name your student number lesson number W solutions one two and three 0 50 100 150 200 250 300 350 400 time your name your student number lesson number 10 o n 0 solutions one two and three 0 100 200 300 400 500 600 700 800 900 1000 time 155 Numerical Experiments In the calculation below we decreased w from 161 to 04 Notice the period increased and the steepness of the spikes decreased your name your student number lesson number 10 two and three solutions one 0 100 200 300 400 500 600 700 800 900 1000 time Next the initial conditions will be chosen closer to the steady state solution so that y10 480 y20 11 and y30 480 The rst calculation reveals the same oscillating pattern is established The second calculation is for a much smaller time interval where tf has been decreased from tf 1000 to 10 your name your student number lesson number 10 two and three solutions one I I I I I I I I I 0 100 200 300 400 500 600 700 800 900 1000 time your name yourstudent number lesson number 10 0 9 2 10 390 C N O E a C O 2 S101 3 6 I 100 o 1 2 3 4 5 6 7 s 9 10 156 Additional Calculations Consider the oregonator chemical reaction with y10 580 yz0 21 and y30 580 Use variable w with ode15s as well as ode45 and ode23s a State the new system of differential equations b Modify the yporegm and oregm les c Execute the oregm le using w S10 and ode15s d Repeat c with w S and 2S Use both ode15s and ode23s e Compare the solutions for different w Use the whos command to determine the number oftime steps using ode45 may not converge ode15s and ode23s