Mathematical modelling of wave energy systems