Analysis of solutions for problems caused by beach erosion and dune encroachment