DAE_slides
DAE_slides
(DAEs)
AM 205
November 4, 2020
Table of Contents
Motivation
Setting
y = y1 + y2 (differential variable)
z = y2 (algebraic variable)
we may obtain
y ′ = −2z
0 = y − t2
This is indeed in the form of
y ′ = f (t, y , z)
0 = g (t, y , z)
.
Differential-algebraic systems (DAEs)
x ′ = u,
y′ = v,
u ′ = −λx,
v ′ = −λy − g ,
0 = x 2 + y 2 − 1,
x ′ = u,
y′ = v,
u ′ = −λx,
v ′ = −λy − g ,
1
ϵλ = 1 − p .
x + y2
2
Here, λ is the spring force per unit length. In the limit ϵ → 0, the
last equation can be rearranged into our length constraint.
Summary - Pros and Cons of DAEs
1
See: wikipedia.org/wiki/Backward_differentiation_formula
BDF Methods
y ′ = f (t, y , z)
0 = g (t, y , z)
y ′ = f (t, q) = f (t, y , z)
0 = g (t, q) = g (t, y , z)
yk+1 + p+1
P
s=0 α k−s yk−s − βhfk+1
rk+1 = =0
gk+1
with Jacobian
" #
∂f ∂f
h
∂r ∂r
i Im×m − βh ∂y −βh ∂z
Jk+1 = ∇q r |k+1 = ∂y ∂z = ∂g ∂g
k+1 ∂y ∂z k+1
Newton’s Method
where " #
∂f ∂f
dae ∂y ∂z
Jk+1 = ∂g ∂g
∂y ∂z k+1
is the purely problem-specific part of the Jacobian, while Jk+1 will
depend on the details of the integrator.
Newton’s Method
For the simple pendulum:
u
v
f (t, q) =
−λx
−λy − g
acc.
n
g (t, q) = x 2 + y 2 − 1
where q = x, y , u, v , λ, and
0 0 1 0 0
0 0 0 1 0
J dae
= −λ 0 0
0 −x
,
0 −λ 0 0 −y
2x 2y 0 0 0
Newton’s Method
dae with
The complete Jacobian is Jk+1 = A + BJk+1
1 0 0 0 0 −βh 0 0 0 0
0
1 0 0 0
0
−βh 0 0 0
0
A= 0 1 0 0 , B = 0
0 −βh 0 0
0 0 0 1 0 0 0 0 −βh 0
0 0 0 0 0 0 0 0 0 1
0 0 1 0 0
0 0 0 1 0
dae
Jk+1 = −λk+1
0 0 0 −xk+1
0 −λk+1 0 0 −yk+1
2xk+1 2yk+1 0 0 0
Newton’s iterations for DAE integration
ϕ′ = ω,
ω ′ = −g cos ϕ,
and maps as
x = cos ϕ,
y = sin ϕ,
u = −ω sin ϕ,
v = ω cos ϕ,
λ = ω 2 − g sin ϕ.
ẋi = vi
mv̇i = Fi ,
ẋi = vi
Fi = 0
Once we have a general solver in place, we can easily swap out the
DAE system. As an extension, consider the double pendulum:
x1′ = u1 ,
y1′ = v1 ,
u1′ = −λ1 x1 − λ2 (x1 − x2 ),
v1′ = −λ1 y1 − λ2 (y1 − y2 ) − g ,
x2′ = u2 ,
y2′ = v2 ,
u2′ = −λ2 (x2 − x1 ),
v2′ = −λ2 (y2 − y1 ) − g ,
0 = x12 + y12 − 1,
0 = (x2 − x1 )2 + (y2 − y1 )2 − 1.
Exercise 2