Shooting Method or Ordinary Dierential Eqations Atar Kaw Ater reading this chapter, yo shold be able to. learn the shooting method algorithm to solve bondary vale problems, and. apply shooting method to solve bondary vale problems. What is the shooting method? Ordinary dierential eqations are given either with initial conditions or with bondary conditions. Look at the problem below. υ q x L Figre A cantilevered niormly loaded beam. To ind the delection υ as a nction o locationx, de to a niorm load q, the ordinary dierential eqation that needs to be solved is d υ dx q EI ( Lx) () where L is the length o the beam, E is the Yong s modls o the beam, and Sorce URL: http://nmericalmethods.eng.s.ed/ Saylor URL: http://www.saylor.org/corses/me05/ Attribted to: University o Soth Florida: Holistic Nmerical Methods Institte Page o
I is the second moment o area o the cross-section o the beam. Two conditions are needed to solve the problem, and those are υ ( 0 ) 0 dυ dx ( 0 ) 0 (a,b) as it is a cantilevered beam at x 0. These conditions are initial conditions as they are given at an initial point, x 0, so that we can ind the delection along the length o the beam. Now consider a similar beam problem, where the beam is simply spported on the two ends υ q x L Figre A simply spported niormly loaded beam. To ind the delection υ as a nction o x de to the niorm load q, the ordinary dierential eqation that needs to be solved is d dx υ qx EI ( xl) () Two conditions are needed to solve the problem, and those are υ ( 0 ) 0 ( L) 0 υ (a,b) as it is a simply spported beam at x 0and x L. These conditions are bondary conditions as they are given at the two bondaries, x 0and x L. Sorce URL: http://nmericalmethods.eng.s.ed/ Saylor URL: http://www.saylor.org/corses/me05/ Attribted to: University o Soth Florida: Holistic Nmerical Methods Institte Page o
The shooting method The shooting method ses the same methods that were sed in solving initial vale problems. This is done by assming initial vales that wold have been given i the ordinary dierential eqation were an initial vale problem. The bondary vale obtained is then compared with the actal bondary vale. Using trial and error or some scientiic approach, one tries to get as close to the bondary vale as possible. This method is best explained by an example. Take the case o a pressre vessel that is being tested in the laboratory to check its ability to withstand pressre. For a thick pressre vessel o inner radis a and oter radis b, the dierential eqation or the radial displacement o a point along the thickness is given by d + r d r 0 (5) Assme that the inner radis a 5" and the oter radis b 8", and the material o the pressre vessel is ASTM6 steel. The yield strength o this type o steel is 6 ksi. Two strain gages that are bonded tangentially at the inner and the oter radis measre the normal tangential strain in the pressre vessel as (6ab) t / ra t / rb 0.000776 0.00086 r a b Figre Cross-sectional geometry o a pressre vessel. Sorce URL: http://nmericalmethods.eng.s.ed/ Saylor URL: http://www.saylor.org/corses/me05/ Attribted to: University o Soth Florida: Holistic Nmerical Methods Institte Page o
at the maximm needed pressre. Since the radial displacement and tangential strain are related simply by then t r, (7) ra 0.000776 5 0.0087'' 0.00086 8 0.000770' ' (8) rb Starting with the ordinary dierential eqation Let d d + 0, r r ( 5) 0.0087, ( 8) 0. 000770 d w (9) Then dw + w r r 0 (0) giving s two irst order dierential eqations as d w, ( 5) 0.0087" dw w +, w( 5) notknown (a,b) r r Let s assme ( 8) ( 5) d w( 5) ( 5) 0. 000658 8 5 Set p the initial vale problem. Sorce URL: http://nmericalmethods.eng.s.ed/ Saylor URL: http://www.saylor.org/corses/me05/ Attribted to: University o Soth Florida: Holistic Nmerical Methods Institte Page o
d ( r,, w), ( 5) 0.0087" w dw w + w r r ( r,, w), ( 5) 0. 000658 (a,b) Using Eler s method, i + i + ( ri, i, wi)h wi + wi + ( ri, i, wi)h (a,b) Let s consider segments between the two bondaries, r 5" and r 8", then 8 5 h 0.75" i 0, r 5, 0 0.0087", w0 0 0 + ( r0, 0, w0)h 0.0087+ 0.0087+ 0.0067" w w0 + ( r0, 0, w0)h 0.000658 ( 5,0.0087, 0.000658) (0.75) ( 0.000658) (0.75) 0.000658+ (5,0.0087, 0.000658) 0.000658 0.0087 0.000658+ + 5 5 0.000098 ( 0.75) ( 0.75) i, r r0 + h 5+ 0.75 5.75", Sorce URL: http://nmericalmethods.eng.s.ed/ Saylor URL: http://www.saylor.org/corses/me05/ Attribted to: University o Soth Florida: Holistic Nmerical Methods Institte Page 5 o
0.0067", w 0.000090 + ( r,, w)h ( 5.75,0.0067, 0.000098)( 0.75) 0.0067+ 0.0067+ 0.00590 w w + ( r,, w)h ( 0.000098) (0.75) ( 5.75,0.0067, 0.000098)( 0.75) 0.000098+ 0.000098+ 0.0000769 ( 0.00005) (0.75) i, r r + h 5.75+ 0.75 6.5" 0.00590", w 0.0000785 + ( r,, w)h ( 6.5,0.00590, 0.0000769)( 0.75) 0.00590+ 0.00590+ 0.0058" w w + ( r,, w)h ( 0.0000769) (0.75) 0.0000769+ 0.0000769+ 0.000055 ( 6.5,0.00590 0.0000769) (0.75) ( 0.00008689) (0.75) Sorce URL: http://nmericalmethods.eng.s.ed/ Saylor URL: http://www.saylor.org/corses/me05/ Attribted to: University o Soth Florida: Holistic Nmerical Methods Institte Page 6 o
i, r r + h 6.50+ 0.75 7.5" 0.0058", w 0.000055 + ( r,, w)h 0.0058+ 0.0058+ 0.006" w w + ( r,, w)h ( 7.5,0.0058,0.000055) (0.75) ( 0.000055) (0.75) 0.0000785+ 0.000055+ 0.00009896 ( 7.5,0.0058, 0.000055) (0.75) ( 0.0000608 )(0.75) At r r r + h 7.5+ 0.75 8" we have ( 8) 0.006" While the given vale o this bondary condition is ( 8) 0.00070" d Let s assme a new vale or ( 5) twice the vale o initial gess. ( 8) ( 5) d w ( 5) ( 5) 8 5. Based on the irst assmed vale, maybe sing ( 0.000658) 0. 0005076 Sorce URL: http://nmericalmethods.eng.s.ed/ Saylor URL: http://www.saylor.org/corses/me05/ Attribted to: University o Soth Florida: Holistic Nmerical Methods Institte Page 7 o
Using h 0. 75, and Eler s method, we get ( 8) 0.009665" While the given vale o this bondary condition is ( 8) 0.000770" Can we se the reslts obtained rom the two previos iterations to get a better estimate d o the assmed initial condition o ( 5)? One method is to se linear interpolation on d the obtained data or the two assmed vales o ( 5). With d we obtained with ( 5) 0.000658, ( 8) 0.006", and d we obtained ( 5) 0.0005076, ( 8) 0.009665" d so a better starting vale o ( 5) knowing that the actal vale at we get ( 8 ) 0.0000770", Sorce URL: http://nmericalmethods.eng.s.ed/ Saylor URL: http://www.saylor.org/corses/me05/ Attribted to: University o Soth Florida: Holistic Nmerical Methods Institte Page 8 o
( 0.000658) ( 0.000770 0.006) + ( 0.000658) d 0.0005076 ( 5) 0.00965 0.006 0.00086 Using h 0.75", and repeating the Eler s method with we get ( 5) 0. 00086 w, ( 8) 0.000769" while the actal given vale o this bondary condition is ( 8 ) 0.000770". In this case, this vale coincides with the actal vale o ( 8). I that were not the case, one wold contine to se linear interpolation to reine the vale o till one gets close to the actal vale o ( 8). Note that the step size and the nmerical method sed wold inlence the accracy or the obtained vales. For the last case, the vales are as ollows ( 5) 0.0087" 0 ( 5.75) 0.005085" ( 6.50) 0.00858" ( 7.5) 0.0058" ( 8.00) 0.000770" See Figre or the comparison o the reslts with dierent initial gesses o the slope. Using h 0. 75 and Rnge-Ktta th order method, ( 5) 0.0087" ( 5.75) 0.00555" Sorce URL: http://nmericalmethods.eng.s.ed/ Saylor URL: http://www.saylor.org/corses/me05/ Attribted to: University o Soth Florida: Holistic Nmerical Methods Institte Page 9 o
( 6.50) 0.00" ( 7.5) 0.0079" ( 8) 0.0007" 5.0E-0.8E-0 d/ -0.000658 Radial Displacement, (in).6e-0.e-0 d/d r -0.00086 Exact.E-0 d/ -0.0005076.0E-0 5 6 7 8 Radial Location, r (in) Figre Comparison o reslts with dierent initial gesses o slope Table shows the comparison o the reslts obtained sing Eler s, Rnge-Ktta and exact methods. Table Comparison o Eler and Rnge-Ktta reslts with exact reslts. r (in) Exact (in) Eler (in) ε (%) t Rnge-Ktta (in) ε (%) t 5.87 0 -.87 0-0.0000.87 0-0.0000 Sorce URL: http://nmericalmethods.eng.s.ed/ Saylor URL: http://www.saylor.org/corses/me05/ Attribted to: University o Soth Florida: Holistic Nmerical Methods Institte Page 0 o
5.75 6.5 7.5 8.5567 0 -.66 0 -.89 0 -.0770 0 -.5085 0 -.858 0 -.58 0 -.0770 0 -.7.58 9.8967 0 -.9500 0 -.555 0 -. 0 -.79 0 -.07 0 -.58 0-7.07 0 -.6 0 -.568 0 - Sorce URL: http://nmericalmethods.eng.s.ed/ Saylor URL: http://www.saylor.org/corses/me05/ Attribted to: University o Soth Florida: Holistic Nmerical Methods Institte Page o