Bvp Multiple Shooting
-
Upload
rajdeep-dutta -
Category
Documents
-
view
225 -
download
0
Transcript of Bvp Multiple Shooting
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 1/31
ReviewMultiple Shooting
Richardson ExtrapolationSummary
BVPS – MULTIPLE SHOOTING TECHNIQUE
Dr. Johnson
School of Mathematics
Semester 1 2008
Dr. Johnson MATH65241
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 2/31
ReviewMultiple Shooting
Richardson ExtrapolationSummary
OUTLINE
1 REVIEW
2 MULTIPLE SHOOTING
High Order ProblemsCorrecting the guess
3 RICHARDSON EXTRAPOLATION
Exploiting our knowledge of errors
4 SUMMARY
Dr. Johnson MATH65241
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 3/31
ReviewMultiple Shooting
Richardson ExtrapolationSummary
OUTLINE
1 REVIEW
2 MULTIPLE SHOOTING
High Order ProblemsCorrecting the guess
3 RICHARDSON EXTRAPOLATION
Exploiting our knowledge of errors
4 SUMMARY
Dr. Johnson MATH65241
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 4/31
ReviewMultiple Shooting
Richardson ExtrapolationSummary
OUTLINE
1 REVIEW
2 MULTIPLE SHOOTING
High Order ProblemsCorrecting the guess
3 RICHARDSON EXTRAPOLATION
Exploiting our knowledge of errors
4 SUMMARY
Dr. Johnson MATH65241
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 5/31
ReviewMultiple Shooting
Richardson ExtrapolationSummary
OUTLINE
1 REVIEW
2 MULTIPLE SHOOTING
High Order ProblemsCorrecting the guess
3 RICHARDSON EXTRAPOLATION
Exploiting our knowledge of errors
4 SUMMARY
Dr. Johnson MATH65241
R i
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 6/31
ReviewMultiple Shooting
Richardson ExtrapolationSummary
BOUNDARY VALUE PROBLEMS
Boundary value problems are commonplace in CFD andmathematics in general
Newton’s Shooting method:
gn+1 = gn −φ( gn)
φ′( gn)
Can use the Secant method to generate φ′,
or solve the augmented system to generate φ′ and useNewton’s method
Newton’s method is quadratic, so should converge in 5-15iterations
Dr. Johnson MATH65241
R i
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 7/31
ReviewMultiple Shooting
Richardson ExtrapolationSummary
BOUNDARY VALUE PROBLEMS
Boundary value problems are commonplace in CFD andmathematics in general
Newton’s Shooting method:
gn+1 = gn −φ( gn)
φ′( gn)
Can use the Secant method to generate φ′,
or solve the augmented system to generate φ′ and useNewton’s method
Newton’s method is quadratic, so should converge in 5-15iterations
Dr. Johnson MATH65241
Review
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 8/31
ReviewMultiple Shooting
Richardson ExtrapolationSummary
High Order ProblemsCorrecting the guess
OUTLINE
1 REVIEW
2 MULTIPLE SHOOTING
High Order ProblemsCorrecting the guess
3 RICHARDSON EXTRAPOLATION
Exploiting our knowledge of errors
4 SUMMARY
Dr. Johnson MATH65241
Review
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 9/31
ReviewMultiple Shooting
Richardson ExtrapolationSummary
High Order ProblemsCorrecting the guess
A FOURTH ORDER PROBLEM
Consider the problem:
d4 y
dx4
= y3 −dy
dx
2
,
with the boundary conditions
y(0) = 1, y′(0) = 0, y(1) = 2, and y′(1) = 1
We have two starting conditions at x = 0,
and two final conditions at x = 1.
Therefore we need to guess y′′′ and y(IV ) at x = 0
Dr. Johnson MATH65241
Review
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 10/31
ReviewMultiple Shooting
Richardson ExtrapolationSummary
High Order ProblemsCorrecting the guess
A FOURTH ORDER PROBLEM
Consider the problem:
d4 y
dx4
= y3 −dy
dx
2
,
with the boundary conditions
y(0) = 1, y′(0) = 0, y(1) = 2, and y′(1) = 1
We have two starting conditions at x = 0,
and two final conditions at x = 1.
Therefore we need to guess y′′′ and y(IV ) at x = 0
Dr. Johnson MATH65241
Review
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 11/31
ReviewMultiple Shooting
Richardson ExtrapolationSummary
High Order ProblemsCorrecting the guess
INITIAL CONDITIONS
Let us define
Y1 = y, Y2 = y′
, Y3 = y′′
, and Y4 = y′′′
then our initial conditions will look like
Y1 = 1, Y2 = 0, Y3 = e, and Y4 = g
where e and g are guesses
Dr. Johnson MATH65241
Review
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 12/31
Multiple ShootingRichardson Extrapolation
Summary
High Order ProblemsCorrecting the guess
INITIAL CONDITIONS
Let us define
Y1 = y, Y2 = y′
, Y3 = y′′
, and Y4 = y′′′
then our initial conditions will look like
Y1 = 1, Y2 = 0, Y3 = e, and Y4 = g
where e and g are guesses
Dr. Johnson MATH65241
Review
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 13/31
Multiple ShootingRichardson Extrapolation
Summary
High Order ProblemsCorrecting the guess
SATISFYING THE BOUNDARY CONDITIONS
We now have two conditions to satisfy, and hence twofunctions
φ1(e, g) =Y1(x = 1; e, g) − 2
φ2(e, g) =Y2(x = 1; e, g) − 1
We need to iterate on both e and g to ensure both φ1 = 0and φ2 = 0
To proceed we need to use a Taylor expansion for afunction of two variables
f (x + a, y + b) = f (x, y) + a∂ f
∂x+ b
∂ f
∂ y+ R1(x, y)
Dr. Johnson MATH65241
Review
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 14/31
Multiple ShootingRichardson Extrapolation
Summary
High Order ProblemsCorrecting the guess
SATISFYING THE BOUNDARY CONDITIONS
We now have two conditions to satisfy, and hence twofunctions
φ1(e, g) =Y1(x = 1; e, g) − 2
φ2(e, g) =Y2(x = 1; e, g) − 1
We need to iterate on both e and g to ensure both φ1 = 0and φ2 = 0
To proceed we need to use a Taylor expansion for afunction of two variables
f (x + a, y + b) = f (x, y) + a∂ f
∂x+ b
∂ f
∂ y+ R1(x, y)
Dr. Johnson MATH65241
Reviewl i l h i i h d bl
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 15/31
Multiple ShootingRichardson Extrapolation
Summary
High Order ProblemsCorrecting the guess
OUTLINE
1 REVIEW
2 MULTIPLE SHOOTING
High Order ProblemsCorrecting the guess
3 RICHARDSON EXTRAPOLATION
Exploiting our knowledge of errors
4 SUMMARY
Dr. Johnson MATH65241
ReviewM lti l Sh ti Hi h O d P bl
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 16/31
Multiple ShootingRichardson Extrapolation
Summary
High Order ProblemsCorrecting the guess
TAKING A GUESS
Then let us perform a Taylor expansion around the guessese and ˆ g to get
φ1(e + de, ˆ g + dg) =φ1(e, ˆ g) + de
∂φ1
∂e + dg
∂φ1
∂ˆ g + R1(e, ˆ g)
φ2(e + de, ˆ g + dg) =φ2(e, ˆ g) + de∂φ2
∂e+ dg
∂φ2
∂ˆ g+ R1(e, ˆ g)
Dr. Johnson MATH65241
ReviewM lti l Sh ti Hi h O d P bl
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 17/31
Multiple ShootingRichardson Extrapolation
Summary
High Order ProblemsCorrecting the guess
TAKING A GUESS
Then let us perform a Taylor expansion around the guessese and ˆ g to get
φ1(e + de, ˆ g + dg) =φ1(e, ˆ g) + de
∂φ1
∂e + dg
∂φ1
∂ˆ g + R1(e, ˆ g)
φ2(e + de, ˆ g + dg) =φ2(e, ˆ g) + de∂φ2
∂e+ dg
∂φ2
∂ˆ g+ R1(e, ˆ g)
Set both φ(e + de, ˆ g + dg) = 0, and the remainder R1 = 0.
Dr. Johnson MATH65241
ReviewMultiple Shooting High Order Problems
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 18/31
Multiple ShootingRichardson Extrapolation
Summary
High Order ProblemsCorrecting the guess
TAKING A GUESS
Then let us perform a Taylor expansion around the guessese and ˆ g to get
∂φ1
∂e de +
∂φ1
∂ˆ g dg = − φ1(e, ˆ g)
∂φ2
∂ede +
∂φ2
∂ˆ gdg = − φ2(e, ˆ g)
and we are left with simultaneous equations for de and dg.In matrix form this can be written as:
J( g )dg = −φ( g )
Dr. Johnson MATH65241
ReviewMultiple Shooting High Order Problems
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 19/31
Multiple ShootingRichardson Extrapolation
Summary
High Order ProblemsCorrecting the guess
THE SOLUTION
Given the equations in matrix form,
J( g )dg = −φ( g )where g is a vector of guesses, φ is the vector of conditionsand J is the Jacobian matrix.
We can write the correction as
dg = − J−1( g )φ( g ).
Dr. Johnson MATH65241
ReviewMultiple Shooting
l k l d f
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 20/31
Multiple ShootingRichardson Extrapolation
Summary
Exploiting our knowledge of errors
OUTLINE
1 REVIEW
2 MULTIPLE SHOOTING
High Order ProblemsCorrecting the guess
3 RICHARDSON EXTRAPOLATION
Exploiting our knowledge of errors
4 SUMMARY
Dr. Johnson MATH65241
ReviewMultiple Shooting
E l iti k l d f
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 21/31
Multiple ShootingRichardson Extrapolation
Summary
Exploiting our knowledge of errors
TRUNCATION ERRORS
Suppose that we use a method with truncation error of O(hm) to compute an approximation wi.
We can exploit the way in which our approximationconverges towards the solution
0.63
0.64
0.65
0.66
0.67
0.68
0.69
0.7
0.71
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07
w n
h
The most common technique is Richardson extrapolation.
Dr. Johnson MATH65241
ReviewMultiple Shooting
E l iti k l d f
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 22/31
p gRichardson Extrapolation
Summary
Exploiting our knowledge of errors
TRUNCATION ERRORS
Suppose that we use a method with truncation error of O(hm) to compute an approximation wi.
We can exploit the way in which our approximationconverges towards the solution
0.63
0.64
0.65
0.66
0.67
0.68
0.69
0.7
0.71
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07
w n
h
The most common technique is Richardson extrapolation.
Dr. Johnson MATH65241
ReviewMultiple Shooting
Exploiting our knowledge of errors
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 23/31
p gRichardson Extrapolation
Summary
Exploiting our knowledge of errors
TWO APPROXIMATIONS ARE BETTER THAN ONE
Suppose w(1)n is an approximation with step size h
and w(2)n with step size 2h
Then we can write
w(1)n = yi + E0hm + E1hm+1 + . . .
and
w(2)n = yi + E0(2h)m + E1(2h)m+1 + . . .
Dr. Johnson MATH65241
ReviewMultiple Shooting
Exploiting our knowledge of errors
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 24/31
Richardson ExtrapolationSummary
Exploiting our knowledge of errors
TWO APPROXIMATIONS ARE BETTER THAN ONE
Suppose w(1)n is an approximation with step size h
and w(2)n with step size 2h
Then we can write
w(1)n = yi + E0hm + E1hm+1 + . . .
and
w(2)n = yi + E0(2h)m + E1(2h)m+1 + . . .
Dr. Johnson MATH65241
ReviewMultiple Shooting
h d lExploiting our knowledge of errors
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 25/31
Richardson ExtrapolationSummary
Exploiting our knowledge of errors
TWO APPROXIMATIONS ARE BETTER THAN ONE
So eliminating the first term E0 we have
2mw(1)n − w
(2)n = (2m − 1) yi + O(hm+1)
thenw∗
n =2mw
(1)n − w
(2)n
2m − 1= yi + O(hm+1)
and the approximation w∗n is better than w
(1)n or w
(2)n .
For a fourth order method such as RK4 the above gives
w∗n =
16w(1)n − w
(2)n
15
Dr. Johnson MATH65241
ReviewMultiple Shooting
Ri h d E t l tiExploiting our knowledge of errors
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 26/31
Richardson ExtrapolationSummary
Exploiting our knowledge of errors
TWO APPROXIMATIONS ARE BETTER THAN ONE
So eliminating the first term E0 we have
2mw(1)n − w
(2)n = (2m − 1) yi + O(hm+1)
thenw∗
n =2mw
(1)n − w
(2)n
2m − 1= yi + O(hm+1)
and the approximation w∗n is better than w
(1)n or w
(2)n .
For a fourth order method such as RK4 the above gives
w∗n =
16w(1)n − w
(2)n
15
Dr. Johnson MATH65241
ReviewMultiple Shooting
Ri h d E t l tiExploiting our knowledge of errors
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 27/31
Richardson ExtrapolationSummary
p g g
EXAMPLE - EULER’S METHOD
Solve y′ = x + sin( y) with y(0) = 0 at x = 1
n h wn w∗n = 2w
(1)n − w
(2)n |w
(1)n − w
(2)n | ratio
16 0.0625 0.633632 0.03125 0.6709 0.7083 0.0373
64 0.01562 0.6902 0.7095 0.0192 1.9370128 0.00781 0.7000 0.7098 0.0097 1.9687256 0.00390 0.7049 0.7098 0.0049 1.9844512 0.00195 0.7074 0.7099 0.0024 1.9922
1024 0.00097 0.7086 0.7099 0.0012 1.9961
We get similar accuracy extrapolating with n = 16 andn = 32, as we do by taking n = 1024
Extrapolation will not always work this well! It dependson how smooth the errors are.
Dr. Johnson MATH65241
ReviewMultiple Shooting
Richardson ExtrapolationExploiting our knowledge of errors
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 28/31
Richardson ExtrapolationSummary
p g g
MORE GENERAL RICHARDSON EXTRAPOLATION
Let A(h) and A
hk
be approximations to Y that depends
on the step size h for some k
A(h) = Y + a0hm + . . . , Ah
k
= Y + a0h
km
+ . . .
then we may write the general approximation A∗(h) as
A∗(h) = km
A h
k− A(h)
km − 1
We may perform further extrapolations on theextrapolated results to eliminate higher order errors
Dr. Johnson MATH65241
ReviewMultiple Shooting
Richardson ExtrapolationExploiting our knowledge of errors
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 29/31
Richardson ExtrapolationSummary
MORE GENERAL RICHARDSON EXTRAPOLATION
Let A(h) and A
hk
be approximations to Y that depends
on the step size h for some k
A(h) = Y + a0hm + . . . , Ah
k
= Y + a0h
km
+ . . .
then we may write the general approximation A∗(h) as
A∗(h) = km
A h
k− A(h)
km − 1
We may perform further extrapolations on theextrapolated results to eliminate higher order errors
Dr. Johnson MATH65241
ReviewMultiple Shooting
Richardson Extrapolation
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 30/31
Richardson ExtrapolationSummary
SUMMARY
If we have a vector of guesses, the correction can bewritten as:
dg = − J−1( g )φ( g )
We can use either the Secant method or solve theaugmented system to generate the Jacobian J.
If we know the order of a scheme, we can exploit it togenerate better approximations at low expense.
The general formula for Richardson extrapolation is:
A∗(h) =km A
hk
− A(h)
km − 1
Dr. Johnson MATH65241
ReviewMultiple Shooting
Richardson Extrapolation
8/3/2019 Bvp Multiple Shooting
http://slidepdf.com/reader/full/bvp-multiple-shooting 31/31
Richardson ExtrapolationSummary
SUMMARY
If we have a vector of guesses, the correction can bewritten as:
dg = − J−1( g )φ( g )
We can use either the Secant method or solve theaugmented system to generate the Jacobian J.
If we know the order of a scheme, we can exploit it togenerate better approximations at low expense.
The general formula for Richardson extrapolation is:
A∗(h) =km A
hk
− A(h)
km − 1
Dr. Johnson MATH65241