Steps taken (Simplified):

1. Get the base dimensions of WR 42 waveguide

2. Simulate base WR 42 in HFSS

3. Use Smith Chart using a quarter wave to match (gamma L from smith chart of base)

4. Make MATLAB routine to approximate d2 value from smith chart

5. Add appropriate modifications to the base WR 42 in HFSS

Base WR42:

Modified WR42: