Using the EME solver to simulate and optimize waveguide bends