# Wave Equation

Contents

## Imposing Boundary Conditions

The task of this exercise is to impose a *time dependent Dirichlet boundary condition* for the wave equation. You can edit the file `hedge/examples/wave/wave-min.py` for this exercise.

### Guidelines

Things to do in `hedge/examples/wave/wave-min.py`:

Define a function that returns the desired value for every point in the domain. (e.g. 1 if x>0, 0 else)

Define a time dependent function that returns a vector which only contains the values returned by

`a.`on the boundary. Use`discr.interpolate_boundary_function()`for this purpose.Be sure to modify the call of the

`StrongWaveOperator`in order to use the new boundary conditions.

Things to do in the operator `hedge/hedge/pde.py`:

You have modified the call of the

`StrongWaveOperator`so you have to adapt the initialization of the class`StrongWaveOperator`to these modifications in order to pass the dirichlet boundary condition to the operator.In the method

`rhs`the boundary condition has to be attached to the right hand side.In the method

`op_template`you will find the following line:`dir_bc = join_fields(-u, v)`. You have to change it according to the changes you made in`rhs`.

## Imposing an additional Convection (Simulating Wind)

The task of this exercise is to superpose a drift to the wave equation. Have a look at the wave equation and modify it in order to realize this drift. You will have to change the flux as well as the operator.