lec8a
TRANSCRIPT
-
8/10/2019 lec8a
1/33
Introduction to Simulation - Lecture 8
1-D Nonlinear Solution Methods
Jacob White
Thanks to Deepak Ramaswamy Jaime Peraire, Michal
Rewienski, and Karen Veroy
-
8/10/2019 lec8a
2/33
Outline
Nonlinear Problems
Struts and Circuit Example Richardson and Linear Convergence
Simple Linear Example
Newtons Method Derivation of Newton
Quadratic Convergence
Examples
Global Convergence
Convergence Checks
-
8/10/2019 lec8a
3/33
Nonlinear
problemsStrut Example
0 0( , )x y 1 1( , )x y
Given: x0, y0, x1, y1, WFind: x2, y2
2 2( , )x y
Load forceW
0yf W Need to Solve 0xf
-
8/10/2019 lec8a
4/33
SMA-HPC 2003 MIT
Nonlinear Problems
Struts Example
Reminder: Strut Forces
1 1,x y
Y 0 00
1
1
2 2
1 1
c
x
y
L Lf EA L LL
xf f
L
yf f
L
L x y
L
yff
xf
(0,0)
X
-
8/10/2019 lec8a
5/33
Nonlinear
problemsStrut Example
2 01 1
1
( )x ox xf L LL
2 2
1 2 0 2 0L x x y y
Load forceW
0 0( , )x y 1 1( , )x y
2 2
2 2 1 2 1L x x y y
2 12 2
2
( )x ox x
f L L
L
2 2( , )x y
1f2f
1 2 0x xf f 1 2 0y yf f W
-
8/10/2019 lec8a
6/33
Nonlinear
problems
Strut Example
Why Nonlinear?
2 12
2( )o
y y
L LL
2 0
11
( ) 0o
y yL L W
L
The strut forces change
in both magnitude and
direction
Pull Hard on the
Struts
-
8/10/2019 lec8a
7/33
Circuit ExampleNonlinear
problems
Need to Solve
0d rI I
+-
-
+
( 1) 0d
t
VV
d sI I e 10v
10
dV
1v 2v 1 010
r rI V
0srcv r
I I
-
8/10/2019 lec8a
8/33
Solve IterativelyNonlinear
problems
Hard to find analytical solution for ( ) 0f x
Solve iterativelyguess at a solution
repeat for k = 0, 1, 2, .
until
Ask
Does the iteration converge to correct solution ?
How fast does the iteration converge?
0
0x x
1k kx W x 1 0kf x
-
8/10/2019 lec8a
9/33
DefinitionRichardson
Iteration
Richardson Iteration Definition
1 ( )k k kx x f x
An iteration stationary point is a solution1k kx x
( ) 0k
f x * ( )kx x Solution
-
8/10/2019 lec8a
10/33
Example 1Richardson
Iteration
( ) 0.7 10f x x
Start with 0 0x 1 0 0
2 1 1
2 2
3
3 3
4
( ) 10( ) 13
( ) 13.9( ) 14.17
x x f xx x f x
x x f xx x f x
5
6
7
8
14.2514.27
14.2814.28
xx
xx
Converged
-
8/10/2019 lec8a
11/33
Example 1Richardson
Iteration( ) 0.7 10f x x
*kx x
-
8/10/2019 lec8a
12/33
Example 2Richardson
Iteration
( ) 2 10f x x
Start with 0 0x
1 0 0
2 1 1
3 2 2
4 3 3
( ) 10( ) 40
( ) 130
( ) 400
x x f xx x f x
x x f x
x x f x
No convergence !
-
8/10/2019 lec8a
13/33
Convergence
Setup
Richardson
Iteration
1
( )
k k k
x x f x
* * *
0
( )x x f x
Iteration Equation
Exact Solution
Computing Differences
1 * * *
( ) ( )
k k k
x x x x f x f x
Need to Estimate
-
8/10/2019 lec8a
14/33
Convergence
Mean Value Theorem
Richardson
Iteration
( ) f vf v f y v yx
,v v y
v y
f
v
x
-
8/10/2019 lec8a
15/33
Convergence
Use MVT
Richardson
Iteration
Iteration Equation
Computing Differences
1
( )
k k k
x x f x
Exact Solution
* * *
0
( )x x f x
1 * * *( ) ( )k k kx x x x f x f x
*1 k
f xx x
x
-
8/10/2019 lec8a
16/33
Convergence
Richardson Theorem
Richardson
Iteration
*1 1 for all s.t.
f x
x x xx
If0 *x x And
Then 1 * *k kx x x x
Or 1 * 0 *lim lim 0k kk kx x x x
Linear Convergence
-
8/10/2019 lec8a
17/33
Example 1Richardson
Iteration( ) 0.7 10f x x
*kx x
-
8/10/2019 lec8a
18/33
ProblemsRichardson
Iteration
Convergence is only linear
x, f(x) not in the same units:x is a voltage,f(x) a current in circuits
x is a displacement,f(x) a force in struts Adding 2 different physical quantities
But a Simple Algorithm Just calculatef(x) and update
-
8/10/2019 lec8a
19/33
Newtons method
Another approach
From the Taylor series about solution
* *0 ( ) ( ) ( ) ( )k k kdff x f x x x xdx
Define iteration
Do k = 0 to . 11
1
( ) ( )
( )
k k k k
k
dfx x x f x
dx
dfif x exists
dx
until convergence
-
8/10/2019 lec8a
20/33
Graphically
Newtons Method
-
8/10/2019 lec8a
21/33
ExampleNewtons Method
-
8/10/2019 lec8a
22/33
ExampleNewtons Method
*kx x
-
8/10/2019 lec8a
23/33
ConvergenceNewtons Method
2* * * 2
2
*
0 ( ) ( ) ( )( ) ( )( )
some [ , ]
k k k k
k
df d f f x f x x x x x x x
dx dx
x x x
Mean Value theorem
truncates Taylor series
But10 ( ) ( )( )k k k
dff x x x x
dx
k by Newtondefinition
-
8/10/2019 lec8a
24/33
ConvergenceNewtons Method
Contd.
21 * * 2
2( )( ) ( )( )k k k
df d f x x x x x x
dx d x
Subtracting
21 * 1 * 2
2( ) [ ( )] ( )( )k k k
df d f x x x x x x
dx d x
Dividing through
1 2
2Suppose ( ) ( ) for all
df d f x x L x
dx d x
21 * *then k kx x L x x
Convergence is quadratic if L is bounded
-
8/10/2019 lec8a
25/33
Newtons Method Convergence
Example 1
21
2 21 * * *
* 2
2
1 *
*
( ) 2
( ) 1 0,
2 ( ) 1
2 ( ) 2 ( )
1( ) (
( 1
)2
)
k k
k k k k
k k k k k
k k
k
dfx x
dx
x x x x
x x x x x x x
f x x fin
x
d x x
or x x x xx
Convergence is quadratic
-
8/10/2019 lec8a
26/33
ConvergenceNewtons Method
Example 2
1 2
1 *
* *
1
2 *
( ) 2
2 ( 0) ( 0)1
0 0
( ) 0,
for 02
1( ) ( )
2
0
k k
k k k
k k k
k k
df x xdx
x x x
x x x x
or x x x
f x
x
x x
Convergence is linear
Note : not bounded
away from zero
1
dfdx
-
8/10/2019 lec8a
27/33
ConvergenceNewtons Method
Examples 1 , 2
-
8/10/2019 lec8a
28/33
ConvergenceNewtons Method
*0
*
if 1
then converges tok
L x x
x x
Proof * * *
1 0 0
* *
1 0
* * *
2 0 1
* 2 * 3 *
2 1 0
* 4 * 7 *
3 2 0
( )x x L x x x x
x x x x
x x L x x x x
or x x x x x x
x x x x x x
1 2
2Suppose ( ) ( ) for all
df d f x x L x
dx d x
-
8/10/2019 lec8a
29/33
ConvergenceNewtons Method
Theorem
2
2If is bounded ( bounded away from zero ; bounded)
then Newton's method is guaranteed to converge given a "close
enough" guess
df d f L
dx dx
Always converges ?
-
8/10/2019 lec8a
30/33
SMA-HPC 2003 MIT
ConvergenceNewtons Method
Example
Convergence Depends on a Good Initial Guess
X
f(x)
0
x
1x2
x
0
x
1x
-
8/10/2019 lec8a
31/33
SMA-HPC 2003 MIT
Convergence
Convergence Checks
Newtons Method
Need a "delta-x" check to avoid false convergence
X
f(x)
1kx kx *x
1 ak ff x
1 1
a r
k k k
x xx x x
-
8/10/2019 lec8a
32/33
SMA-HPC 2003 MIT
Convergence
Convergence Checks
Newtons Method
Also need an " " check to avoid false convergencef x
X
f(x)
1kx kx
*x
1
a
k
ff x
1 1
a r
k k k
x xx x x
-
8/10/2019 lec8a
33/33
Summary
Nonlinear Problems
Struts and Circuit Example
Richardson and Linear Convergence
Simple Linear Example
1-D Newtons Method
Derivation of Newton
Quadratic Convergence
Examples
Global Convergence Convergence Checks