|
- The wave equation is the most prominent example of a second order hyperbolic
differential equation. The variant which we consider here has one space dimension and reads
(d/dt)**2 u = c**2 (d/dx)**2 u
with x in ]0,1[ and t > 0.
The characteristics of this equation are the lines
t = (1/c)*x + a1 , t= -(1/c)*x + a2
with arbitrary constants a1, a2.
c has the meaning of speed of propagation.
- This equation describes the simplest form of a wave propagation.
- In order to get a well posed problem one needs boundary conditions for the
boundaries x=0, t >= 0 and x=1, t >= 0 and initial
conditions for the initial displacement u(x,0) and is speed (d/dt)u(x,t), t=0.
The present implementation fixes the boundary values at
u(x,t)=0, x in {0,1}
and also the
initial speed to
(d/dt)u(x,t)t=0=0.
This has the advantage that the exact solution is known analytically:
take the odd periodic continuation of u(x,0) over the complete real axis.
Given a point (x,t) with 0 <= x <= 1, t > 0 draw the two
characteristics through this point and follow them to their intersection with
the x-axis. Take the midvalue of the function values of this continuation
at these points: this is equal to u(x,t).
Hence given an arbitrary u(x,0) (of course with u(0,0)=u(1,0)=0)
we know the discretization error of any method we might try.
- you may think of u as the normal displacement of a string of length
one, fixed at its ends and of (d/dt)u as its initial normal displacement speed.
- Here we use the standard 5 point difference discretization of the differential operator.
This is equivalent to using the vertical method of lines on the x-grid and then
Störmers discretization
method for a second order ordinary differential equation in explicit form.
- The scheme reads
uhj,n+1 = 2*uhj,n-uhj,n-1
+((Δt/Δx)*c)**2*(uhj+1,n-2*uhj,n+
uhj-1,n)
n denotes the time step and j the number in the space grid.
- The discretization is second order consistent in Δx, Δt
and convergent if the Courant-Friedrichs-Levy condition is satisfied, which boils down here to
c*Δt/Δx < = 1 .
|