The scalar wave equation in Method of Lines form

Ian Hawke



WaveMoL is an example implementation of a thorn that uses the method of lines thorn MoL. The wave equation in first order form is implemented.

1 Purpose

WaveToy is the simple test thorn that comes with Cactus as standard. This is written so that it solves the wave equation

t2ϕ = xi2ϕi (1)

directly using the leapfrog scheme. This form of the equations isn’t suitable for use with the method of lines.

The purpose of this thorn is to rewrite the equations in first order form

tΦ = xiΠi, (2) tΠj = xjΦ, (3) tϕ = Φ, (4) xjϕ = Πj. (5)

The first three equations (which expand to five separate PDEs) will be evolved. The final equation is used to set the initial data and can be thought of as a constraint.

This will be implemented using simple second order differencing in space. Time evolution is performed by the method of lines thorn MoL.

2 How it works

The equations are evolved entirely using the method of lines thorn. So all we have to provide (for the evolution) is a method of calculating the right hand side of equation (2) and boundary conditions. The boundary conditions are standard from wavetoy itself. The right hand side is calculated using second order centred finite