# Numerical Time Integration

(1)

## Numerical Time Integration

(2)

### (position)

시간(t)에 대한 적분 (integration) 시간(t)에 대한 미분 (differentiation) 시간(t)에 대한 적분 (integration) 시간(t)에 대한 미분 (differentiation)

(3)

### = !v(t) = !!p(t)

시간(t)에 대한 미분 (differentiation)

### (position)

시간(t)에 대한 적분 (integration) 시간(t)에 대한 미분 (differentiation) 시간(t)에 대한 적분 (integration) 시간(t)에 대한 미분 (differentiation)

(4)

### (position)

시간(t)에 대한 적분 (integration) 시간(t)에 대한 미분 (differentiation) 시간(t)에 대한 적분 (integration) 시간(t)에 대한 미분 (differentiation)

### = !v(t) = !!p(t)

시간(t)에 대한 미분 (differentiation)

### + Δt) = p(t) + Δt ⋅v(t)

시간(t)에 대한 적분 (integration)

(5)
(6)

(7)

### +1) = ?

t : the current time (hour)

x(t) : the current position (km) v(t) : the current speed (km/h)

assumption) 1. constant speed

(8)

### +1) = ?

t : the current time (hour)

x(t) : the current position (km) v(t) : the current speed (km/h)

assumption) 1. constant speed

2. rectilinear motion

(9)

### +1) = ?

t : the current time (hour)

x(t) : the current position (km) v(t) : the current speed (km/h)

assumption) 1. constant speed

2. rectilinear motion

(10)

### +1) = ?

t : the current time (hour)

x(t) : the current position (km) v(t) : the current speed (km/h)

assumption) 1. constant speed

2. rectilinear motion

(11)

### +1) = ?

t : the current time (hour)

x(t) : the current position (km) v(t) : the current speed (km/h)

assumption) 1. constant speed

2. rectilinear motion

### +1) = 140 = 10 +1×130

from the rate of change of it! We can get the next position

(12)

### +1) = ?

t : the current time (hour)

x(t) : the current position (km) v(t) : the current speed (km/h)

assumption) 1. constant speed

2. rectilinear motion

### +1) = 140 = 10 +1×130

from the rate of change of it! We can get the next position

(13)
(14)

2

3

(15)

2

3

### x(t)

! path tangent vector:

(16)

2

3

path

(17)

2

3

numerical error

path

(18)

2

(19)

(20)
(21)

### ⋅!!x(t)

v(t + Δt) = v(t) + Δt ⋅g x(t + Δt) = x(t) + Δt ⋅v(t) mv(t + Δt) − v(t) Δt = m ⋅g

(22)

### 01_FreeFall

The velocity increases more gradually as it falls downward. So, the every interval of time is increasing.

(23)

### ⋅x(t)

v(t + Δt) = v(t) + Δt ⋅g − Δt ⋅ k m ⋅x(t) x(t + Δt) = x(t) + Δt ⋅v(t) mv(t + Δt) − v(t) Δt = m ⋅g − k ⋅x(t)

(24)

(25)

### ⋅v(t)

v(t + Δt) = v(t) + Δt ⋅g − Δt ⋅ k m ⋅x(t) − Δ t ⋅c m ⋅v(t) x(t + Δt) = x(t) + Δt ⋅v(t) mv(t + Δt) − v(t) Δt = m ⋅g − k ⋅x(t) − c⋅v(t)

(26)

### 03_MassSpringDamper_ForwardEuler

It oscillates stably.

(27)

(28)

(29)

(30)

### Backward Euler Time Integration

m!!x(t) = f (t) = f (x(t),v(t)) = mg − kx(t) − cv(t) Δx ≡ x(t + Δt) − x(t)

(31)

### Backward Euler Time Integration

m!!x(t) = f (t) = f (x(t),v(t)) = mg − kx(t) − cv(t) Δx = Δt ⋅v(t) Δv = Δt m ⋅ f(t) Δx = Δt ⋅v(t + Δt) Δv = Δt m ⋅ f(t + Δt) explicit Euler (forward Euler) implicit Euler (backward Euler)

conditionally stable unconditionally stable but, unknowns: f(t + Δt) vs

Δx ≡ x(t + Δt) − x(t) Δv ≡ v(t + Δt) − v(t)

(32)

(33)

Δv = Δt

(34)

### Backward Euler Time Integration

Δv = Δt

m ⋅ f(t + Δt) = Δ t

(35)

### Backward Euler Time Integration

Δv = Δt m ⋅ f(t + Δt) = Δt m ⋅ f(t) + Δx ⋅ ∂ f(t) ∂x + Δv ⋅ ∂ f(t) ∂v ⎛ ⎝⎜ ⎞⎠⎟

### (

∵Taylor's expansion

### )

= Δt m ⋅ f x(t + Δt),v(t + Δt)

(36)

### Backward Euler Time Integration

Δv = Δt m ⋅ f(t + Δt) = Δt m ⋅ f(t) + Δx ⋅ ∂ f(t) ∂x + Δv ⋅ ∂ f(t) ∂v ⎛ ⎝⎜ ⎞⎠⎟ = Δt m ⋅ m ⋅g − cv(t) − kx(t) − Δx ⋅ k − Δv ⋅c

### )

∵Taylor's expansion

### )

∵∂f / ∂x = −k,∂f / ∂v = −c

### )

= Δt m ⋅ f x(t + Δt),v(t + Δt)

### )

∵f = mg − cv − kx

(37)

### Backward Euler Time Integration

Δv = Δt m ⋅ f(t + Δt) ∵Δx = Δt ⋅v(t + Δt) = Δt ⋅ v(t) + Δv

### )

= Δt m ⋅ f(t) + Δx ⋅ ∂ f(t) ∂x + Δv ⋅ ∂ f(t) ∂v ⎛ ⎝⎜ ⎞⎠⎟ = Δt m ⋅ m ⋅g − cv(t) − kx(t) − Δx ⋅ k − Δv ⋅c

### )

∵Taylor's expansion

### )

∵∂f / ∂x = −k,∂f / ∂v = −c

### )

= Δt m ⋅ f x(t + Δt),v(t + Δt)

### )

∵f = mg − cv − kx

### )

= Δt m ⋅ m ⋅g − cv(t) − kx(t) − Δt ⋅ v(t) + Δv

⋅ k − Δv ⋅c

(38)

### Backward Euler Time Integration

Δv = Δt m ⋅ f(t + Δt) ∵Δx = Δt ⋅v(t + Δt) = Δt ⋅ v(t) + Δv

### )

= Δt m ⋅ f(t) + Δx ⋅ ∂ f(t) ∂x + Δv ⋅ ∂ f(t) ∂v ⎛ ⎝⎜ ⎞⎠⎟ = Δt m ⋅ m ⋅g − cv(t) − kx(t) − Δx ⋅ k − Δv ⋅c

### )

∵Taylor's expansion

### )

∵∂f / ∂x = −k,∂f / ∂v = −c

### )

= Δt m ⋅ f x(t + Δt),v(t + Δt)

### )

∵f = mg − cv − kx

### )

= Δt m ⋅ m ⋅g − cv(t) − kx(t) − Δt ⋅ v(t) + Δv

⋅ k − Δv ⋅c

### )

= Δt m ⋅ m ⋅g − cv(t) − kx(t) − Δt ⋅ k ⋅v(t) − Δt ⋅ k ⋅ Δv − Δv ⋅c

(39)

### Backward Euler Time Integration

Δv = Δt m ⋅ f(t + Δt) ∵Δx = Δt ⋅v(t + Δt) = Δt ⋅ v(t) + Δv

### )

= Δt m ⋅ f(t) + Δx ⋅ ∂ f(t) ∂x + Δv ⋅ ∂ f(t) ∂v ⎛ ⎝⎜ ⎞⎠⎟ = Δt m ⋅ m ⋅g − cv(t) − kx(t) − Δx ⋅ k − Δv ⋅c

### )

∵Taylor's expansion

### )

∵∂f / ∂x = −k,∂f / ∂v = −c

### )

= Δt m ⋅ f x(t + Δt),v(t + Δt)

### )

∵f = mg − cv − kx

### )

= Δt m ⋅ m ⋅g − cv(t) − kx(t) − Δt ⋅ v(t) + Δv

⋅ k − Δv ⋅c

### )

= Δt m ⋅ m ⋅g − cv(t) − kx(t) − Δt ⋅ k ⋅v(t) − Δt ⋅ k ⋅ Δv − Δv ⋅c

### )

∴Δv = Δt m + Δt2 ⋅ k + Δt ⋅c ⋅ m ⋅g − cv(t) − kx(t) − Δt ⋅ k ⋅v(t)

(40)

2

### + Δt) = x(t) + Δt ⋅v(t + Δt)

energy loss artificial damping

(41)

2

### + Δt) = x(t) + Δt ⋅v(t + Δt)

energy loss artificial damping

(42)
(43)

2

(44)
(45)

### Comparison: 02 vs 04

We can use a large time step because it is unconditionally stable. However, it has some artificial damping.

(46)

!

(47)

(48)

### + Δt)

numerical error numerical error

path

(49)

(50)

### + Δt)

numerical error path

(51)

### Explicit vs Implicit

Both schemes have some numerical errors, but explicit diverges and implicit converges!

explicit implicit

(52)

(53)

(54)

(55)
(56)

Updating...

관련 주제 :