In this paper we present the development and verification of feed horn simulation code based on the mode matching technique to simulate the electromagnetic performance of waveguide based structures of rectangular cross-section. This code is required to model multi-mode pyramidal horns which may be required for future far infrared (far IR) space missions where wavelengths in the range of 30 to 200 pm will be analysed. Multi-mode pyramidal horns can be used effectively to couple radiation to sensitive superconducting devices like Kinetic Inductance Detectors (KIDs) or Transition Edge Sensor (TES) detectors. These detectors could be placed in integrating cavities (to further increase the efficiency) with an absorbing layer used to couple to the radiation. The developed code is capable of modelling each of these elements, and so will allow full optical characterisation of such pixels and allow an optical efficiency to be calculated effectively.As the signals being measured at these short wavelengths are at an extremely low level, the throughput of the system must be maximised and so multi-mode systems are proposed. To this end, the focal planes of future far IR missions may consist of an array of multi-mode rectangular feed horns feeding an array of, for example, TES devices contained in individual integrating cavities. Such TES arrays have been fabricated by SRON Groningen and are currently undergoing comprehensive optical, electrical and thermal verification. In order to fully understand and validate the optical performance of the receiver system, it is necessary to develop comprehensive and robust optical models in parallel. We outline the development and verification of this optical modelling software by means of applying it to a representative multi-mode system operating at 150 GHz in order to obtain sufficiently short execution times so as to comprehensively test the code.SAFARI (SPICA FAR infrared Instrument) is a far infrared imaging grating spectrometer, to be proposed as an ESA M5 mission. It is planned for this mission to be launched on board the proposed SPICA (SPace Infrared telescope for Cosmology and Astrophysics) mission, in collaboration with JAXA. SAFARI is planned to operate in the 1.5-10 THz band, focussing on the formation and evolution of galaxies, stars and planetary systems. The pixel that drove the development of the techniques presented in this paper is typical of one option that could be implemented in the SAFARI focal plane, and so the ability to accurately understand and characterise such pixels is critical in the design phase of the next generation of far IR telescopes.