Professional Documents
Culture Documents
061
Examples for home preparation
starting from the seeding point ~x = (1, 1)T (at time t = 0). Use the following methods
with the time-step ∆t = 0.1. Compute the difference in the final position at t =
2π between R-K 3 and R-K 4. Can one use this difference as an estimate of the
discretization error of R-K 3 or R-K 4?
Hint: You can find a list of Runge-Kutta methods and a template script in TUWEL.
− gl sin θ
ω̇
= f~ ≡ (2)
θ̇ ω
starting from the initial angle θ = π/2 and zero angular velocity ω = 0 at t0 = 0.
Assume l = 2, g = 1. Let us define a state vector y = (ω, θ)T .
(a) Compute the trajectory of the pendulum in the phase diagram θ − ω using the
second-order Adams-Bashforth method:
∆t
yk+1 = yk + (3fk − fk−1 )
2
Use the explicit Euler scheme for the first time step. What ∆t do you need to
obtain a converged result?
1
Exercise 4 322.061: Fundamentals of Numerical Thermo-Fluid Dynamics
4.3 We want to solve the advection of passive scalar by time dependent velocity
∂t u = − sin(2πt)∂x u , on Ω = [−1/2, 1]
(x−0.5)2
u(t = 0, x) = e− 0.04
(3)
u(t, x = 0) = u(t, x = 1)
∂x u(t, x = 0) = ∂x u(t, x = 1)
in one spatial dimension on a grid with uniform spacing ∆x. Semi-discretization with
second order central differences in space leads to an initial value problem