Electromagnetic Modeling of Waveguide Discontinuities