Boundary conditions

Boundary conditions are part of the initial value problem. Depending on the physical phenomena that one is trying to simulate, the boundary conditions maybe of some sort or another. The esiest boundary conditions that one can implement are the fixed boundaries or Dirichlet conditions. In this case, the value of the function f is specified at the borders of the domain at all times. This means that:

One can use this to simulate a lot of things. Take a look at the animation below:

The animation represents the physical situation of a pulse traveling in a string that gets reflected by a wall. After the pulse gets reflected, the wave function becomes negative. This was done by setting all the initial conditions to 0 and playing with the boundary conditions. On the right boundary, the function is always 0. But on the left boundary, the function is equal to a sin function that changes over time. After half a period, the boundary conditions changes to a new type: outgoing wave boundary condition. Lets take a look at another animation:

In this case, the right boundary has a Neumann boundary condition. In this case, the function is not specified at the boundary, instead the partial derivative with respect to x is specified. For the case of the massless ring, the space derivative must be 0 at all times. If that was not the case, an infinite vertical acceleration would arise. To implement this condition, we can use an approximation of the derivative of second order and set it to 0:

The last type of boundary condition is the outgoing wave condition. In this case, we don't want to let any waves come in, we only want to let waves go out. To achieve this on the right boundary, we have to solve the advection equation on the point N:

which can be done by substituting the discrete versions of the partial derivatives:

With the boundary conditions seen, a lot of different experimental arrays can be simulated.

Last updated