Frequency domain simulation of a straight waveguide