shooting method

17
06/08/22 http:// numericalmethods.eng.usf.edu 1 Shooting Method Major: All Engineering Majors Authors: Autar Kaw, Charlie Barker http://numericalmethods.eng.u sf.edu Transforming Numerical Methods Education for STEM Undergraduates

Upload: justine-chen

Post on 31-Dec-2015

275 views

Category:

Documents


7 download

DESCRIPTION

Shooting Method. Major: All Engineering Majors Authors: Autar Kaw, Charlie Barker http://numericalmethods.eng.usf.edu Transforming Numerical Methods Education for STEM Undergraduates. Shooting Method http://numericalmethods.eng.usf.edu. Shooting Method. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Shooting Method

04/19/23http://

numericalmethods.eng.usf.edu 1

Shooting Method

Major: All Engineering Majors

Authors: Autar Kaw, Charlie Barker

http://numericalmethods.eng.usf.eduTransforming Numerical Methods Education for STEM

Undergraduates

Page 2: Shooting Method

Shooting Method

http://numericalmethods.eng.usf.edu

Page 3: Shooting Method

http://numericalmethods.eng.usf.edu3

Shooting Method

The shooting method uses the methods used in solving initial value problems. This is done by assuming initial values that would have been given if the ordinary differential equation were a initial value problem. The boundary value obtained is compared with the actual boundary value. Using trial and error or some scientific approach, one tries to get as close to the boundary value as possible.

Page 4: Shooting Method

http://numericalmethods.eng.usf.edu4

Example

ba

r

0030770.08

,0038731.05

,01

22

2

u

ur

u

dr

du

rdr

ud

Let

wdr

du

Then

01

2

r

uwrdr

dw

Where a = 5and b = 8

Page 5: Shooting Method

http://numericalmethods.eng.usf.edu5

Solution

Two first order differential equations are given as

0038371.05, uwdr

du

knownnotwr

u

r

w

dr

dw 5,

2

Let us assume

00026538.0

58

5855

uu

dr

duw

To set up initial value problem

0038371.05,,,1 uwurfwdr

du

00026538.05,,,22 wwurf

r

u

r

w

dr

dw

Page 6: Shooting Method

http://numericalmethods.eng.usf.edu6

Solution Cont

Using Euler’s method,

hwurfuu iiiii ,,11

hwurfww iiiii ,,21

Let us consider 4 segments between the two boundaries, and then,

5r8r

75.04

58

h

Page 7: Shooting Method

http://numericalmethods.eng.usf.edu7

Solution Cont

00026538.0,0038371.0,5,0 000 wuriFor

0036741.0

75.000026538.00038371.0

75.000026538.0,0038371.0,50038371.0

,,

1

000101

f

hwurfuu

00010938.0

75.05

0038371.0

5

00026538.000026538.0

75.0)00026538.0,0038371.0,5(00026538.0

,,

2

2

000201

f

hwurfww

Page 8: Shooting Method

http://numericalmethods.eng.usf.edu8

Solution Cont

For ,75.575.05,1 01 hrri 00010940.0,0036741.0 11 wu

0035920.0

75.000010938.00036741.0

75.000010938.0,0036741.0,75.50036741.0

,,

1

111112

f

hwurfuu

000011769.0

75.000013015.000010938.0

75.000010938.0,0036741.0,75.500010938.0

,,

2

111212

f

hwurfww

Page 9: Shooting Method

http://numericalmethods.eng.usf.edu9

Solution Cont

For 5.675.075.5,2 12 hrri 000011785.0,0035920.0 22 wu

0035832.0

75.0000011769.00035920.0

75.0000011769.0,0035920.0,5.60035920.0

,,

1

222123

f

hwurfuu

000053352.0

75.0000086829.0000011769.0

75.0000011769.0,0035920.0,5.6000011769.0

,,

2

222223

f

hwurfww

Page 10: Shooting Method

http://numericalmethods.eng.usf.edu10

Solution Cont25.775.050.6,3 23 hrri 000053332.0,0035832.0 33 wuFor

0036232.0

75.0000053352.00035832.0

75.0000053352.0,0035832.0,25.70035832.0

,,

1

333134

f

hwurfuu

000098961.0

75.0000060811.0000053352.0

75.0000053352.0,0035832.0,75.5000011785.0

,,

2

333234

f

hwurfww

875.025.734 hrrr

0036232.08 4 uu

So at

Page 11: Shooting Method

http://numericalmethods.eng.usf.edu11

Solution Cont

Let us assume a new value for 5dr

du

00053076.000026538.0258

582525

uu

dr

duw

Using 75.0h and Euler’s method, we get

"0029665.08 4 uu

While the given value of this boundary condition is

0030770.08 4 uu

Page 12: Shooting Method

http://numericalmethods.eng.usf.edu12

Solution Cont

Using linear interpolation on the obtained data for the two assumed values of

5dr

du we get

00030770.08 u

00026538.00036232.00030770.00036232.00029645.0

00026538.000053076.05

dr

du

00048611.0

Using 75.0h and repeating the Euler’s method with 00048611.0)5( w

0030769.08 4 uu

Page 13: Shooting Method

http://numericalmethods.eng.usf.edu13

Solution Cont

Using linear interpolation to refine the value of 4u

till one gets close to the actual value of 8u which gives you,

0038731.051 uu

0035085.075.5 2 uu

0032858.050.6 3 uu

0031518.025.7 4 uu

0030770.000.8 5 uu

Page 14: Shooting Method

http://numericalmethods.eng.usf.edu14

Comparisons of different initial guesses

3.0E-03

3.2E-03

3.4E-03

3.6E-03

3.8E-03

4.0E-03

5 6 7 8Radial Location, r (in)

Rad

ial

Dis

pla

cem

ent,

u

(in

)

du/dr = -0.00026538

du/dr = -0.00053076

du/d r= -0.00048611

Exact

Page 15: Shooting Method

http://numericalmethods.eng.usf.edu15

Comparison of Euler and Runge-Kutta Results with

exact results

Table 1 Comparison of Euler and Runge-Kutta results with exact results.

r (in) Exact (in) Euler (in)Runge-

Kutta (in)

55.756.57.25

8

3.8731×10−3

3.5567×10−3

3.3366×10−3

3.1829×10−3

3.0770×10−3

3.8731×10−3

3.5085×10−3

3.2858×10−3

3.1518×10−3

3.0770×10−3

0.00001.37311.5482

9.8967×10−1

1.9500×10−3

3.8731×10−3

3.5554×10−3

3.3341×10−3

3.1792×10−3

3.0723×10−3

0.00003.5824×10−

2

7.4037×10−

2

1.1612×10−

1

1.5168×10−

1

%t %t

Page 16: Shooting Method

Additional ResourcesFor all resources on this topic such as digital audiovisual lectures, primers, textbook chapters, multiple-choice tests, worksheets in MATLAB, MATHEMATICA, MathCad and MAPLE, blogs, related physical problems, please visit

http://numericalmethods.eng.usf.edu/topics/shooting_method.html

Page 17: Shooting Method

THE END

http://numericalmethods.eng.usf.edu