COMPUTATIONAL
DYNAMICS
Jesan Morales
ME 195
Supervised by Dr. Goyal
University of California Merced
Dec 22 2013
Pendulum problem
• Forward Euler Method
• Simulink
• Linear Statespace
• Backward Euler
• Newton method
Particle problem
• Euler methods
• Newton method
• Non-linear Statespace
• Generalized Alpha method
Static Rod Model
Overview
Pendulum problem
𝜃 =
−𝑔
𝐿
sin(𝜃)
𝜽 𝟎 = 𝟏
𝜽 𝟎 = 𝟎
𝑭𝒊𝒏𝒅 𝒕𝒉𝒆 𝒇𝒖𝒄𝒕𝒊𝒐𝒏 Ѳ
Figure 1. Pendulum.
Forward Euler Method
𝑦𝑖+1 = 𝑦𝑖 + 𝑦𝑖ℎ
𝑦𝑖+1 = 𝑦𝑖 + 𝑦𝑖ℎ
Graph 1…
ℎ=.2
Step size
• The step size h was
increased to h=0.002
Smoother and no speed
loss
Graph 2…
Simulink
Figure 2. Simulink model.
Simulink Statespace
𝑥1
𝑥2
=
0 1
−𝑔
𝑙
0
𝑥1
𝑥2
+
0
0
𝑢1
𝑢2
𝑥1 = 𝜃 𝑥2 = 𝜃 𝑥1 = 𝑥2
𝑥2 = 𝜃 =
−𝑔
𝑙
sin(𝑥1)
y= 1 0
𝑥1
𝑥2
+0
𝑢1
𝑢2
Comparing error with different methods
hold on
• plot(time,theta,'r'); >>>>>>>>>>>>>>>>>>>>>> euler
• plot(timesimulink,pendulumsimulink,'g');>>>> Simulink
• plot(time,real,'b');>>>>>>>>>>>>>>>>>>>>>>>> by hand
• plot(timesimulink,Statespace,‘dot'); >>>>>>> state space
Graph 4. Method Comparison Graph 5. Method comparison (close-up)
Particle problem
• A particle is traveling with an acceleration described with
this non-linear second order differential equation
 𝑦 =
( − 𝑦
3
− 8sin(y) +0.2)
3
The initial conditions of
𝑦(0) = 0 and y(0)=0.2
are given
• Find the position of the particle
at any given time t Figure 3. www.wpclipart.com
Damping
Graph 6.Damping. www.splung.com
Damping
• 𝑚 𝑥 + 𝑐 𝑥 + 𝑘𝑥 = 0
• 𝜁 =
𝑐
2 𝑚𝑘
• Critical damping (ζ = 1)
• Over-damping (ζ > 1)
• Under-damping (0 ≤ ζ < 1)
0 = 3 𝑦 +
𝑦
3
+ 8 sin 𝑦 + .2
𝜁=
1/3
2 3∗8
=.034021
• Under-damped
Under-Damped
Graph 7. Underdamped Oscillations. http://commons.wikimedia.org
Forward Euler Method
• 𝑦𝑖+1 = 𝑦𝑖 + 𝑦𝑖ℎ
• 𝑦𝑖+1 = 𝑦𝑖 + (
,2−8sin(𝑦)− 𝑦 𝑖 𝑖
3
)ℎ
• 𝑦𝑖+1 = 𝑦𝑖 + 𝑦𝑖ℎ
• 𝑦𝑖+1 = 𝑦𝑖 + ( 𝑦𝑖 + (
,2−8sin(𝑦)− 𝑦 𝑖 𝑖
3
)ℎ)ℎ
Image 4. Forward Euler Method
Forward Euler Method
Results : h=2
Graph 8. Step 2
Forward Euler Method
h=1
Graph 9. Step 1
h=.02
Results (cont.) h=0.2
Forward Euler Method
Graph 10.Step 0.2
Results (Cont.) h= 0.02
Forward Euler Method
Graph 11. Step 0.02
Results (cont.) h= 0 .002
Forward Euler Method
Graph 12. Step 0.002
Forward Euler Method
Results (cont.) h= 0 .002
Graph 13. Step 0.002 Zoomed-out
Backwards Euler method
• 𝑦𝑖+1 = 𝑦𝑖 + 𝑦𝑖+1ℎ
• 𝑦𝑖+1 = 𝑦𝑖 +
,2−8sin(𝑦 𝑖+1)−
𝑦 𝑖+1
3
3
ℎ
• 𝑦𝑖+1 =
( 𝑦 𝑖+
.2−8 sin 𝑦 𝑖+1
3
ℎ)
(1+
ℎ
9
)
Backwards Euler Method (cont.)
• 𝑦𝑖+1 = 𝑦𝑖 + 𝑦𝑖+1ℎ
• 𝑦𝑖+1 = 𝑦𝑖 +
𝑦 𝑖+
.2−8 sin 𝑦 𝑖+1
3
ℎ
1+
ℎ
9
ℎ
• 0 = −𝑦𝑖+1 + 𝑦𝑖 +
𝑦 𝑖+
.2−8 sin 𝑦 𝑖+1
3
ℎ
1+
ℎ
9
ℎ
• 0 = −𝑥 + 𝑦𝑖 +
𝑦 𝑖+
.2−8 sin 𝑥
3
ℎ
1+
ℎ
9
ℎ
Newton Method
 f(x) = −𝑥 + 𝑦𝑖 +
𝑦 𝑖+
.2−8 sin 𝑥
3
ℎ
1+
ℎ
9
ℎ
 f’(x)=−1 −
8 cos 𝑥 ℎ2
3+
ℎ
3
• Guess a value of 𝑥 𝑘 = 𝑥0
• 𝑥 𝑘+1 = 𝑥 𝑘 −
𝑓(𝑥 𝑘)
𝑓′(𝑥 𝑘)
Iterate with a tolerance of 10−7
Symbolic vs. Discretize
• Symbolic functions
• Takes about 5 minutes
• Anonymous functions
• About 20 seconds
• Discretized
• Takes a few seconds
Graph 12.
Non-Linear Statespace
𝑥1 = 𝑦 , 𝑥2 = 𝑦′
y’’ =( -y’/3 - 8sin(y) +.2)/3
𝑥1
𝑥2
=
𝑥2
−𝑥2
3
− 8 sin 𝑥1 + .2
3
Euler Statespace
• 𝑦𝑖+1 = 𝑦𝑖 +
.2−8 sin 𝑦 𝑖+1 −
𝑦 𝑖+1
3
3
ℎ
•
𝑥1 𝑖+1
𝑥2 𝑖+1
=
𝑥1 𝑖 + ℎ𝑥2 𝑖+1
𝑥2 𝑖 +
.2−8 sin 𝑥1 𝑖+1 −
𝑥2 𝑖+1
3
ℎ
3
• g(x)=
𝑔1(𝑥)
𝑔2(𝑥)
=
−𝑥1 𝑖+1 + 𝑥1 𝑖
+ ℎ𝑥2 𝑖+1
−𝑥2 𝑖+1 + 𝑥2 𝑖 +
.2−8 sin 𝑥1 𝑖+1 −
𝑥2 𝑖+1
3
ℎ
3
Euler Statespace
• g’(x)=
𝑑𝑔1
𝑑𝑥1 𝑖+1
𝑑𝑔1
𝑑𝑥2 𝑖+1
𝑑𝑔2
𝑑𝑥1 𝑖+1
𝑑𝑔2
𝑑𝑥2 𝑖+1
• g’(x)=
−1 ℎ
−8ℎ𝑐𝑜𝑠(𝑥1)
3
−(1 +
ℎ
9
)
• 𝑥 𝑘+1 = 𝑥 𝑘 −
𝑔(𝑥)
𝑔′(𝑥)
• 𝑥 𝑘+1 = 𝑥 𝑘 − 𝑖𝑛𝑣𝑒𝑟𝑠𝑒 𝑔′ 𝑥 ∗ 𝑔(𝑥)
General Alpha Method
• 𝑦 = 𝑓 𝑦, 𝑡 , 𝑦 𝑡0 = 𝑦0
• 𝑦𝑖+1 = 𝑦𝑖 + ∆𝑡 1 − 𝛾 𝑦𝑖 + 𝛾 𝑦𝑖+1
• 𝛼 𝑦𝑖 + 1 − 𝛼 𝑦𝑖+1 = 𝛽𝑓𝑖 + (1 − 𝛽)𝑓𝑖+1
• 𝛼 − 𝛽 + 𝛾 =
1
2
Euler Statespace
Image 5. Euler Satespace h=.002
General Alpha Method (cont.)
• 𝑦𝑖+1 = 𝑦𝑖 + ∆𝑡 1 − 𝛾 𝑦𝑖 + 𝛾 𝑦𝑖
• 𝑥1 = 𝑦
• 𝑥2 = 𝑦′
• 𝑥3 = 𝑦′′=
−𝑥2
3
−8 sin 𝑥1 +.2
3
• 𝑔1 𝑥 =
𝐺1(𝑥)
𝐺2(𝑥)
=
−𝑥1 𝑖+1 + 𝑥1 𝑖
+ ∆𝑡 1 − 𝛾 𝑥2 𝑖 + 𝛾𝑥2 𝑖
𝑥2 𝑖 + ∆𝑡 1 − 𝛾 𝑥3 𝑖 + 𝛾𝑥3 𝑖
• 𝑔2 𝑥 =
𝐺3(𝑥)
𝐺4(𝑥)
=
−𝛼𝑥2 𝑖 − 1 − 𝛼 𝑥2 𝑖+1 + 𝛽𝑓1 𝑖
+ (1 − 𝛽)𝑓1 𝑖+1
−𝛼𝑥3 𝑖 − 1 − 𝛼 𝑥3 𝑖+1 + 𝛽𝑓2 𝑖
+ (1 − 𝛽)𝑓2 𝑖+1
Non-Linear Statespace
𝑥1 = 𝑦 , 𝑥2 = 𝑦′
y’’ =( -y’/3 - 8sin(y) +.2)/3
f(x)=
𝑥1
𝑥2
=
𝑥2
−𝑥2
3
−8 sin 𝑥1 +.2
3
General Alpha Method (Cont.)
g(x)=
𝑔1(𝑥)
𝑔2(𝑥)
=
−𝑥1 𝑖+1 + 𝑥1 𝑖
+ ∆𝑡 1 − 𝛾 𝑥2 𝑖 + 𝛾𝑥2 𝑖+1
−𝑥2 𝑖+1 + 𝑥2 𝑖 + ∆𝑡 1 − 𝛾 𝑥3 𝑖
+ 𝛾𝑥3 𝑖+1
−𝛼𝑥2 𝑖 − 1 − 𝛼 𝑥2 𝑖+1 + 𝛽𝑓1 𝑖
+ (1 − 𝛽)𝑓1 𝑖+1
−𝛼𝑥3 𝑖 − 1 − 𝛼 𝑥3 𝑖+1 + 𝛽𝑓2 𝑖
+ (1 − 𝛽)𝑓2 𝑖+1
𝑔′ 𝑥 =
𝑑𝑔1
𝑑𝑥1 𝑖+1
𝑑𝑔1
𝑑𝑥2 𝑖+1
𝑑𝑔2
𝑑𝑥1 𝑖+1
𝑑𝑔2
𝑑𝑥2 𝑖+1
=
General Alpha Method (Cont.)
• 𝑔′ x =
−1 0
0 −1
𝛾ℎ 0
0 𝛾ℎ
0 (1 − 𝛾)
−8cos(𝑥)(1−𝛾)
3
−(1−𝛾)
9
(𝛼 − 1) 0
0 (𝛼 − 1)
Newton with General Alpha Method
• 𝑥 𝑘+1 = 𝑥 𝑘 − 𝑖𝑛𝑣𝑒𝑟𝑠𝑒 𝑔′ 𝑥 ∗ 𝑔 𝑥
• h=.001
Image 6.Newton with General Alpha Method
Different 𝛼, 𝛽 𝑎𝑛𝑑 𝛾
( 𝛼,𝛽,𝛾)
Magenta=(0.5,0.5,0.5)
Red=(0.3,0.1,0.3)
Graph 14. Different 𝛼, 𝛽, 𝛾.
General Alpha Method
Graph 15. Generalized Alpha Method
( 𝛼,𝛽,𝛾)
Magenta=(0.5,0.5,0.5)
Red=(0.3,0.1,0.3)
Origin error
Graph 17. Origin Error
( 𝛼,𝛽,𝛾)
Magenta=(0.5,0.5,0.5)
Red=(0.3,0.1,0.3)
( 𝛼,𝛽,𝛾)
Magenta=(0.5,0.5,0.5)
Red=(0.3,0.1,0.3)
( 𝛼,𝛽,𝛾)
Magenta=(0.5,0.5,0.5)
Red=(0.3,0.1,0.3)
( 𝛼,𝛽,𝛾)
Magenta=(0.5,0.5,0.5)
Red=(0.3,0.1,0.3)
( 𝛼,𝛽,𝛾)
Magenta=(0.5,0.5,0.5)
Red=(0.3,0.1,0.3)
Step h= 0.001
( 𝛼,𝛽,𝛾)
Magenta=(0.5,0.5,0.5)
Red=(0.3,0.1,0.3)
General Alpha method
The second-order accuracy for the generalized-α method
requires
𝛼 − 𝛽 + 𝛾 =
1
2
• Unconditionally stable
𝛼, 𝛽 ≤
1
2
≤ 𝛾
General Alpha method
• 𝑦 = 𝑓 𝑦, 𝑡 , 𝑦 𝑡0 = 𝑦0
• 𝑦𝑖+1 = 𝑦𝑖 + ∆𝑡 1 − 𝛾 𝑦𝑖 + 𝛾 𝑦𝑖+1
• 𝛼 𝑦𝑖 + 1 − 𝛼 𝑦𝑖+1 = 𝛽𝑓𝑖 + (1 − 𝛽)𝑓𝑖+1
• 𝛼 − 𝛽 + 𝛾 =
1
2
Forward Euler and Generalized Alpha
Method
• If 𝛾 =0
• 𝑦𝑖+1 = 𝑦𝑖 + ∆𝑡 1 − 𝛾 𝑦𝑖 + 𝛾 𝑦𝑖+1
• 𝑦𝑖+1 = 𝑦𝑖 + ∆𝑡 𝑦𝑖
• and 𝛼 = 𝛽
Forward Euler and Generalized Alpha
Method
• If 𝛾 = 0 and 𝛼 = 𝛽
• Then 𝛼 − 𝛽 + 𝛾 ≠
1
2
• Therefore it is not second order accurate
• Since 𝛼, 𝛽 ≤
1
2
≤ 𝛾
• Is not true then it is not unconditionally stable
Backward Euler and Generalized Alpha
Method
• If 𝛾 = 1
• 𝑦𝑖+1 = 𝑦𝑖 + ∆𝑡 1 − 𝛾 𝑦𝑖 + 𝛾 𝑦𝑖+1
• 𝑦𝑖+1 = 𝑦𝑖 + ∆𝑡 𝑦𝑖+1
• and if 𝛼 = 𝛽
• 𝑦 = 𝑓
Backward Euler and Generalized Alpha
Method
• If 𝛾 = 1 and 𝛼 = 𝛽
• Then 𝛼 − 𝛽 + 𝛾 ≠
1
2
• Therefore it is not second order accurate
• If 𝛼 ≤ 𝛽 ≤
1
2
• Then 𝛼, 𝛽 ≤
1
2
≤ 𝛾 is satisfied and
• Backward Euler is unconditionally stable
Static Rod Model
• The following equation describe the rod model
• Non-linear differential equations govern the formation of
the beam and lead to loop deformation
Image 6.
• These equation represent the following system
• Where s is along the rod
• Unshearable and inextensible
Image 7.
Vectors
• Internal force along the cross section fixed reference
• Moment vector applied to the cross section
• Curvature third component is twist
Constitutive Relationship
• These equations show the relationship between the
moment and the curvature which will be helpful in solving
for the linear and non-linear equations:
Pure Torsion
Image 8. Pure Torsion
Pure Moment
Image 9. Pure Moment
Pure Shear Force
Image 10. Pure Shear Force
All Applied Equally
Image 11. All applied equally
Static Rod Model
• Here are the step taken to derive the equations.
𝜅 =
0
𝑑𝜃
𝑑𝑠
0
𝑓 =
𝑓1
0
𝑓3
𝑡 =
0
0
1
𝑞 =
0
𝑞2
0
• Linearized equations about 𝑎2:
𝑑
𝑑𝑠
𝑓1
𝑓2
𝑓3
+
𝜅1
𝜅2
𝜅3
X
𝑓1
𝑓2
𝑓3
=
−𝐹1
−𝐹2
−𝐹3
>>>>>>>
𝑑
𝑑𝑠
𝑓1
𝑓2
𝑓3
+
𝜅2 𝑓3 − 𝜅3 𝑓2
𝜅3 𝑓1 − 𝜅1 𝑓3
𝜅1 𝑓2 − 𝜅2 𝑓1
=
−𝐹1
−𝐹2
−𝐹3
𝑑
𝑑𝑠
𝑞1
𝑞2
𝑞3
+
𝜅1
𝜅2
𝜅3
X
𝑞1
𝑞2
𝑞3
=
𝑓1
𝑓2
𝑓3
𝑋
0
0
1
>>>>>>>
𝑑
𝑑𝑠
𝑞1
𝑞2
𝑞3
+
𝜅2 𝑞3 − 𝜅3 𝑞2
𝜅3 𝑞1 − 𝜅1 𝑞3
𝜅1 𝑞2 − 𝜅2 𝑞1
=
𝑓2
𝑓1
0
Linear Rod Model
𝑑
𝑑𝑠
𝑓1
0
𝑓3
+
𝜅2 𝑓3
0
−𝜅2 𝑓1
=
−𝐹1
0
−𝐹3
𝑑
𝑑𝑠
𝑞1
𝑞2
𝑞3
+
0
0
0
=
0
𝑓1
0
0
𝑞2
0
=
𝐸𝐼1 𝜅1
𝐸𝐼2 𝜅2
𝐺𝐽𝜅3
Static Rod Model
• 𝜅2 =
𝑞2
𝐸𝐼2
•
𝑑𝑞2
𝑑𝑠
= 𝑓1
•
𝑑𝑓1
𝑑𝑠
+
𝑞2 𝑓3
𝐸𝐼2
= −𝐹1
•
𝑑𝑓3
𝑑𝑠
−
𝑞2 𝑓1
𝐸𝐼2
= −𝐹3
Static Rod Model
• 𝑥 =
𝑓1
𝑓3
𝑞2
,
𝑑𝑥
𝑑𝑠
=
𝑑
𝑑𝑠
𝑓1
𝑓3
𝑞2
, 𝑓 𝑥 =
−𝑓1
−𝑞2 𝑓3
𝐸𝐼2
𝑞2 𝑓1
𝐸𝐼2
, 𝑢 =
0
−𝐹1
−𝐹3
•
𝑑𝑥
𝑑𝑠
= 𝑓 𝑥 + 𝑢
•
𝑑
𝑑𝑠
𝑓1
𝑓3
𝑞2
−
−𝑞2 𝑓3
𝐸𝐼2
𝑞2 𝑓1
𝐸𝑓2
−𝑓1
=
−𝐹1
−𝐹3
0
Static Rod Model
•
𝑑𝑓
𝑑𝑥
=
0 −1 0
−𝑓3
𝐸𝐼2
0
−𝑞2
𝐸𝐼2
𝑓1
𝐸𝐼2
𝑞2
𝐸𝐼2
0
=
𝑑𝑓(𝑥 𝑒)
𝑑𝑥
=
0 −1 0
0 0 0
0 0 0
• 𝑥 𝑒 =
0
0
0
, 𝑓 𝑥 𝑒 =
0
0
0
•
𝑑𝑥
𝑑𝑠
=
𝑑𝑓(𝑥 𝑒)
𝑑𝑥
𝑥 + 𝑢
Linear Rod Model
•
𝑑𝑥
𝑑𝑠
=
𝑑
𝑑𝑠
𝑞2
𝑓3
𝑓1
•
𝑑𝑥
𝑑𝑠
=
0 −1 0
0 0 0
0 0 0
𝑞2
𝑓1
𝑓3
+
0
−𝐹1
−𝐹3
•
𝑑
𝑑𝑠
𝑓1
𝑓3
𝑞2
=
−𝐹3
−𝐹1
−𝑓1
Results
•
𝑑𝑞2
𝑑𝑠
= −𝑓1 𝑄 =
𝑑(−𝑚)
𝑑𝑥
•
𝑑𝑓1
𝑑𝑠
= −𝐹1
•
𝑑𝑓1
𝑑𝑠
= −𝐹3
Thank you for your time
Any Questions?

Computational Dynamics edited

  • 1.
    COMPUTATIONAL DYNAMICS Jesan Morales ME 195 Supervisedby Dr. Goyal University of California Merced Dec 22 2013
  • 2.
    Pendulum problem • ForwardEuler Method • Simulink • Linear Statespace • Backward Euler • Newton method Particle problem • Euler methods • Newton method • Non-linear Statespace • Generalized Alpha method Static Rod Model Overview
  • 3.
    Pendulum problem 𝜃 = −𝑔 𝐿 sin(𝜃) 𝜽𝟎 = 𝟏 𝜽 𝟎 = 𝟎 𝑭𝒊𝒏𝒅 𝒕𝒉𝒆 𝒇𝒖𝒄𝒕𝒊𝒐𝒏 Ѳ Figure 1. Pendulum.
  • 4.
    Forward Euler Method 𝑦𝑖+1= 𝑦𝑖 + 𝑦𝑖ℎ 𝑦𝑖+1 = 𝑦𝑖 + 𝑦𝑖ℎ Graph 1… ℎ=.2
  • 5.
    Step size • Thestep size h was increased to h=0.002 Smoother and no speed loss Graph 2…
  • 6.
  • 7.
    Simulink Statespace 𝑥1 𝑥2 = 0 1 −𝑔 𝑙 0 𝑥1 𝑥2 + 0 0 𝑢1 𝑢2 𝑥1= 𝜃 𝑥2 = 𝜃 𝑥1 = 𝑥2 𝑥2 = 𝜃 = −𝑔 𝑙 sin(𝑥1) y= 1 0 𝑥1 𝑥2 +0 𝑢1 𝑢2
  • 8.
    Comparing error withdifferent methods hold on • plot(time,theta,'r'); >>>>>>>>>>>>>>>>>>>>>> euler • plot(timesimulink,pendulumsimulink,'g');>>>> Simulink • plot(time,real,'b');>>>>>>>>>>>>>>>>>>>>>>>> by hand • plot(timesimulink,Statespace,‘dot'); >>>>>>> state space Graph 4. Method Comparison Graph 5. Method comparison (close-up)
  • 9.
    Particle problem • Aparticle is traveling with an acceleration described with this non-linear second order differential equation  𝑦 = ( − 𝑦 3 − 8sin(y) +0.2) 3 The initial conditions of 𝑦(0) = 0 and y(0)=0.2 are given • Find the position of the particle at any given time t Figure 3. www.wpclipart.com
  • 10.
  • 11.
    Damping • 𝑚 𝑥+ 𝑐 𝑥 + 𝑘𝑥 = 0 • 𝜁 = 𝑐 2 𝑚𝑘 • Critical damping (ζ = 1) • Over-damping (ζ > 1) • Under-damping (0 ≤ ζ < 1) 0 = 3 𝑦 + 𝑦 3 + 8 sin 𝑦 + .2 𝜁= 1/3 2 3∗8 =.034021 • Under-damped
  • 12.
    Under-Damped Graph 7. UnderdampedOscillations. http://commons.wikimedia.org
  • 13.
    Forward Euler Method •𝑦𝑖+1 = 𝑦𝑖 + 𝑦𝑖ℎ • 𝑦𝑖+1 = 𝑦𝑖 + ( ,2−8sin(𝑦)− 𝑦 𝑖 𝑖 3 )ℎ • 𝑦𝑖+1 = 𝑦𝑖 + 𝑦𝑖ℎ • 𝑦𝑖+1 = 𝑦𝑖 + ( 𝑦𝑖 + ( ,2−8sin(𝑦)− 𝑦 𝑖 𝑖 3 )ℎ)ℎ Image 4. Forward Euler Method
  • 14.
    Forward Euler Method Results: h=2 Graph 8. Step 2
  • 15.
  • 16.
    h=.02 Results (cont.) h=0.2 ForwardEuler Method Graph 10.Step 0.2
  • 17.
    Results (Cont.) h=0.02 Forward Euler Method Graph 11. Step 0.02
  • 18.
    Results (cont.) h=0 .002 Forward Euler Method Graph 12. Step 0.002
  • 19.
    Forward Euler Method Results(cont.) h= 0 .002 Graph 13. Step 0.002 Zoomed-out
  • 20.
    Backwards Euler method •𝑦𝑖+1 = 𝑦𝑖 + 𝑦𝑖+1ℎ • 𝑦𝑖+1 = 𝑦𝑖 + ,2−8sin(𝑦 𝑖+1)− 𝑦 𝑖+1 3 3 ℎ • 𝑦𝑖+1 = ( 𝑦 𝑖+ .2−8 sin 𝑦 𝑖+1 3 ℎ) (1+ ℎ 9 )
  • 21.
    Backwards Euler Method(cont.) • 𝑦𝑖+1 = 𝑦𝑖 + 𝑦𝑖+1ℎ • 𝑦𝑖+1 = 𝑦𝑖 + 𝑦 𝑖+ .2−8 sin 𝑦 𝑖+1 3 ℎ 1+ ℎ 9 ℎ • 0 = −𝑦𝑖+1 + 𝑦𝑖 + 𝑦 𝑖+ .2−8 sin 𝑦 𝑖+1 3 ℎ 1+ ℎ 9 ℎ • 0 = −𝑥 + 𝑦𝑖 + 𝑦 𝑖+ .2−8 sin 𝑥 3 ℎ 1+ ℎ 9 ℎ
  • 22.
    Newton Method  f(x)= −𝑥 + 𝑦𝑖 + 𝑦 𝑖+ .2−8 sin 𝑥 3 ℎ 1+ ℎ 9 ℎ  f’(x)=−1 − 8 cos 𝑥 ℎ2 3+ ℎ 3 • Guess a value of 𝑥 𝑘 = 𝑥0 • 𝑥 𝑘+1 = 𝑥 𝑘 − 𝑓(𝑥 𝑘) 𝑓′(𝑥 𝑘) Iterate with a tolerance of 10−7
  • 23.
    Symbolic vs. Discretize •Symbolic functions • Takes about 5 minutes • Anonymous functions • About 20 seconds • Discretized • Takes a few seconds Graph 12.
  • 24.
    Non-Linear Statespace 𝑥1 =𝑦 , 𝑥2 = 𝑦′ y’’ =( -y’/3 - 8sin(y) +.2)/3 𝑥1 𝑥2 = 𝑥2 −𝑥2 3 − 8 sin 𝑥1 + .2 3
  • 25.
    Euler Statespace • 𝑦𝑖+1= 𝑦𝑖 + .2−8 sin 𝑦 𝑖+1 − 𝑦 𝑖+1 3 3 ℎ • 𝑥1 𝑖+1 𝑥2 𝑖+1 = 𝑥1 𝑖 + ℎ𝑥2 𝑖+1 𝑥2 𝑖 + .2−8 sin 𝑥1 𝑖+1 − 𝑥2 𝑖+1 3 ℎ 3 • g(x)= 𝑔1(𝑥) 𝑔2(𝑥) = −𝑥1 𝑖+1 + 𝑥1 𝑖 + ℎ𝑥2 𝑖+1 −𝑥2 𝑖+1 + 𝑥2 𝑖 + .2−8 sin 𝑥1 𝑖+1 − 𝑥2 𝑖+1 3 ℎ 3
  • 26.
    Euler Statespace • g’(x)= 𝑑𝑔1 𝑑𝑥1𝑖+1 𝑑𝑔1 𝑑𝑥2 𝑖+1 𝑑𝑔2 𝑑𝑥1 𝑖+1 𝑑𝑔2 𝑑𝑥2 𝑖+1 • g’(x)= −1 ℎ −8ℎ𝑐𝑜𝑠(𝑥1) 3 −(1 + ℎ 9 ) • 𝑥 𝑘+1 = 𝑥 𝑘 − 𝑔(𝑥) 𝑔′(𝑥) • 𝑥 𝑘+1 = 𝑥 𝑘 − 𝑖𝑛𝑣𝑒𝑟𝑠𝑒 𝑔′ 𝑥 ∗ 𝑔(𝑥)
  • 27.
    General Alpha Method •𝑦 = 𝑓 𝑦, 𝑡 , 𝑦 𝑡0 = 𝑦0 • 𝑦𝑖+1 = 𝑦𝑖 + ∆𝑡 1 − 𝛾 𝑦𝑖 + 𝛾 𝑦𝑖+1 • 𝛼 𝑦𝑖 + 1 − 𝛼 𝑦𝑖+1 = 𝛽𝑓𝑖 + (1 − 𝛽)𝑓𝑖+1 • 𝛼 − 𝛽 + 𝛾 = 1 2
  • 28.
    Euler Statespace Image 5.Euler Satespace h=.002
  • 29.
    General Alpha Method(cont.) • 𝑦𝑖+1 = 𝑦𝑖 + ∆𝑡 1 − 𝛾 𝑦𝑖 + 𝛾 𝑦𝑖 • 𝑥1 = 𝑦 • 𝑥2 = 𝑦′ • 𝑥3 = 𝑦′′= −𝑥2 3 −8 sin 𝑥1 +.2 3 • 𝑔1 𝑥 = 𝐺1(𝑥) 𝐺2(𝑥) = −𝑥1 𝑖+1 + 𝑥1 𝑖 + ∆𝑡 1 − 𝛾 𝑥2 𝑖 + 𝛾𝑥2 𝑖 𝑥2 𝑖 + ∆𝑡 1 − 𝛾 𝑥3 𝑖 + 𝛾𝑥3 𝑖 • 𝑔2 𝑥 = 𝐺3(𝑥) 𝐺4(𝑥) = −𝛼𝑥2 𝑖 − 1 − 𝛼 𝑥2 𝑖+1 + 𝛽𝑓1 𝑖 + (1 − 𝛽)𝑓1 𝑖+1 −𝛼𝑥3 𝑖 − 1 − 𝛼 𝑥3 𝑖+1 + 𝛽𝑓2 𝑖 + (1 − 𝛽)𝑓2 𝑖+1
  • 30.
    Non-Linear Statespace 𝑥1 =𝑦 , 𝑥2 = 𝑦′ y’’ =( -y’/3 - 8sin(y) +.2)/3 f(x)= 𝑥1 𝑥2 = 𝑥2 −𝑥2 3 −8 sin 𝑥1 +.2 3
  • 31.
    General Alpha Method(Cont.) g(x)= 𝑔1(𝑥) 𝑔2(𝑥) = −𝑥1 𝑖+1 + 𝑥1 𝑖 + ∆𝑡 1 − 𝛾 𝑥2 𝑖 + 𝛾𝑥2 𝑖+1 −𝑥2 𝑖+1 + 𝑥2 𝑖 + ∆𝑡 1 − 𝛾 𝑥3 𝑖 + 𝛾𝑥3 𝑖+1 −𝛼𝑥2 𝑖 − 1 − 𝛼 𝑥2 𝑖+1 + 𝛽𝑓1 𝑖 + (1 − 𝛽)𝑓1 𝑖+1 −𝛼𝑥3 𝑖 − 1 − 𝛼 𝑥3 𝑖+1 + 𝛽𝑓2 𝑖 + (1 − 𝛽)𝑓2 𝑖+1 𝑔′ 𝑥 = 𝑑𝑔1 𝑑𝑥1 𝑖+1 𝑑𝑔1 𝑑𝑥2 𝑖+1 𝑑𝑔2 𝑑𝑥1 𝑖+1 𝑑𝑔2 𝑑𝑥2 𝑖+1 =
  • 32.
    General Alpha Method(Cont.) • 𝑔′ x = −1 0 0 −1 𝛾ℎ 0 0 𝛾ℎ 0 (1 − 𝛾) −8cos(𝑥)(1−𝛾) 3 −(1−𝛾) 9 (𝛼 − 1) 0 0 (𝛼 − 1)
  • 33.
    Newton with GeneralAlpha Method • 𝑥 𝑘+1 = 𝑥 𝑘 − 𝑖𝑛𝑣𝑒𝑟𝑠𝑒 𝑔′ 𝑥 ∗ 𝑔 𝑥 • h=.001 Image 6.Newton with General Alpha Method
  • 34.
    Different 𝛼, 𝛽𝑎𝑛𝑑 𝛾 ( 𝛼,𝛽,𝛾) Magenta=(0.5,0.5,0.5) Red=(0.3,0.1,0.3) Graph 14. Different 𝛼, 𝛽, 𝛾.
  • 35.
    General Alpha Method Graph15. Generalized Alpha Method ( 𝛼,𝛽,𝛾) Magenta=(0.5,0.5,0.5) Red=(0.3,0.1,0.3)
  • 36.
    Origin error Graph 17.Origin Error ( 𝛼,𝛽,𝛾) Magenta=(0.5,0.5,0.5) Red=(0.3,0.1,0.3)
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
    Step h= 0.001 (𝛼,𝛽,𝛾) Magenta=(0.5,0.5,0.5) Red=(0.3,0.1,0.3)
  • 42.
    General Alpha method Thesecond-order accuracy for the generalized-α method requires 𝛼 − 𝛽 + 𝛾 = 1 2 • Unconditionally stable 𝛼, 𝛽 ≤ 1 2 ≤ 𝛾
  • 43.
    General Alpha method •𝑦 = 𝑓 𝑦, 𝑡 , 𝑦 𝑡0 = 𝑦0 • 𝑦𝑖+1 = 𝑦𝑖 + ∆𝑡 1 − 𝛾 𝑦𝑖 + 𝛾 𝑦𝑖+1 • 𝛼 𝑦𝑖 + 1 − 𝛼 𝑦𝑖+1 = 𝛽𝑓𝑖 + (1 − 𝛽)𝑓𝑖+1 • 𝛼 − 𝛽 + 𝛾 = 1 2
  • 44.
    Forward Euler andGeneralized Alpha Method • If 𝛾 =0 • 𝑦𝑖+1 = 𝑦𝑖 + ∆𝑡 1 − 𝛾 𝑦𝑖 + 𝛾 𝑦𝑖+1 • 𝑦𝑖+1 = 𝑦𝑖 + ∆𝑡 𝑦𝑖 • and 𝛼 = 𝛽
  • 45.
    Forward Euler andGeneralized Alpha Method • If 𝛾 = 0 and 𝛼 = 𝛽 • Then 𝛼 − 𝛽 + 𝛾 ≠ 1 2 • Therefore it is not second order accurate • Since 𝛼, 𝛽 ≤ 1 2 ≤ 𝛾 • Is not true then it is not unconditionally stable
  • 46.
    Backward Euler andGeneralized Alpha Method • If 𝛾 = 1 • 𝑦𝑖+1 = 𝑦𝑖 + ∆𝑡 1 − 𝛾 𝑦𝑖 + 𝛾 𝑦𝑖+1 • 𝑦𝑖+1 = 𝑦𝑖 + ∆𝑡 𝑦𝑖+1 • and if 𝛼 = 𝛽 • 𝑦 = 𝑓
  • 47.
    Backward Euler andGeneralized Alpha Method • If 𝛾 = 1 and 𝛼 = 𝛽 • Then 𝛼 − 𝛽 + 𝛾 ≠ 1 2 • Therefore it is not second order accurate • If 𝛼 ≤ 𝛽 ≤ 1 2 • Then 𝛼, 𝛽 ≤ 1 2 ≤ 𝛾 is satisfied and • Backward Euler is unconditionally stable
  • 48.
    Static Rod Model •The following equation describe the rod model • Non-linear differential equations govern the formation of the beam and lead to loop deformation Image 6.
  • 49.
    • These equationrepresent the following system • Where s is along the rod • Unshearable and inextensible Image 7.
  • 50.
    Vectors • Internal forcealong the cross section fixed reference • Moment vector applied to the cross section • Curvature third component is twist
  • 51.
    Constitutive Relationship • Theseequations show the relationship between the moment and the curvature which will be helpful in solving for the linear and non-linear equations:
  • 52.
  • 53.
  • 54.
    Pure Shear Force Image10. Pure Shear Force
  • 55.
    All Applied Equally Image11. All applied equally
  • 56.
    Static Rod Model •Here are the step taken to derive the equations. 𝜅 = 0 𝑑𝜃 𝑑𝑠 0 𝑓 = 𝑓1 0 𝑓3 𝑡 = 0 0 1 𝑞 = 0 𝑞2 0 • Linearized equations about 𝑎2: 𝑑 𝑑𝑠 𝑓1 𝑓2 𝑓3 + 𝜅1 𝜅2 𝜅3 X 𝑓1 𝑓2 𝑓3 = −𝐹1 −𝐹2 −𝐹3 >>>>>>> 𝑑 𝑑𝑠 𝑓1 𝑓2 𝑓3 + 𝜅2 𝑓3 − 𝜅3 𝑓2 𝜅3 𝑓1 − 𝜅1 𝑓3 𝜅1 𝑓2 − 𝜅2 𝑓1 = −𝐹1 −𝐹2 −𝐹3 𝑑 𝑑𝑠 𝑞1 𝑞2 𝑞3 + 𝜅1 𝜅2 𝜅3 X 𝑞1 𝑞2 𝑞3 = 𝑓1 𝑓2 𝑓3 𝑋 0 0 1 >>>>>>> 𝑑 𝑑𝑠 𝑞1 𝑞2 𝑞3 + 𝜅2 𝑞3 − 𝜅3 𝑞2 𝜅3 𝑞1 − 𝜅1 𝑞3 𝜅1 𝑞2 − 𝜅2 𝑞1 = 𝑓2 𝑓1 0
  • 57.
    Linear Rod Model 𝑑 𝑑𝑠 𝑓1 0 𝑓3 + 𝜅2𝑓3 0 −𝜅2 𝑓1 = −𝐹1 0 −𝐹3 𝑑 𝑑𝑠 𝑞1 𝑞2 𝑞3 + 0 0 0 = 0 𝑓1 0 0 𝑞2 0 = 𝐸𝐼1 𝜅1 𝐸𝐼2 𝜅2 𝐺𝐽𝜅3
  • 58.
    Static Rod Model •𝜅2 = 𝑞2 𝐸𝐼2 • 𝑑𝑞2 𝑑𝑠 = 𝑓1 • 𝑑𝑓1 𝑑𝑠 + 𝑞2 𝑓3 𝐸𝐼2 = −𝐹1 • 𝑑𝑓3 𝑑𝑠 − 𝑞2 𝑓1 𝐸𝐼2 = −𝐹3
  • 59.
    Static Rod Model •𝑥 = 𝑓1 𝑓3 𝑞2 , 𝑑𝑥 𝑑𝑠 = 𝑑 𝑑𝑠 𝑓1 𝑓3 𝑞2 , 𝑓 𝑥 = −𝑓1 −𝑞2 𝑓3 𝐸𝐼2 𝑞2 𝑓1 𝐸𝐼2 , 𝑢 = 0 −𝐹1 −𝐹3 • 𝑑𝑥 𝑑𝑠 = 𝑓 𝑥 + 𝑢 • 𝑑 𝑑𝑠 𝑓1 𝑓3 𝑞2 − −𝑞2 𝑓3 𝐸𝐼2 𝑞2 𝑓1 𝐸𝑓2 −𝑓1 = −𝐹1 −𝐹3 0
  • 60.
    Static Rod Model • 𝑑𝑓 𝑑𝑥 = 0−1 0 −𝑓3 𝐸𝐼2 0 −𝑞2 𝐸𝐼2 𝑓1 𝐸𝐼2 𝑞2 𝐸𝐼2 0 = 𝑑𝑓(𝑥 𝑒) 𝑑𝑥 = 0 −1 0 0 0 0 0 0 0 • 𝑥 𝑒 = 0 0 0 , 𝑓 𝑥 𝑒 = 0 0 0 • 𝑑𝑥 𝑑𝑠 = 𝑑𝑓(𝑥 𝑒) 𝑑𝑥 𝑥 + 𝑢
  • 61.
    Linear Rod Model • 𝑑𝑥 𝑑𝑠 = 𝑑 𝑑𝑠 𝑞2 𝑓3 𝑓1 • 𝑑𝑥 𝑑𝑠 = 0−1 0 0 0 0 0 0 0 𝑞2 𝑓1 𝑓3 + 0 −𝐹1 −𝐹3 • 𝑑 𝑑𝑠 𝑓1 𝑓3 𝑞2 = −𝐹3 −𝐹1 −𝑓1
  • 62.
    Results • 𝑑𝑞2 𝑑𝑠 = −𝑓1 𝑄= 𝑑(−𝑚) 𝑑𝑥 • 𝑑𝑓1 𝑑𝑠 = −𝐹1 • 𝑑𝑓1 𝑑𝑠 = −𝐹3
  • 63.
    Thank you foryour time Any Questions?