A modelling framework for ultrasonic inspection of waveguides with arbitrary discontinuities, excited using piezoelectric transducers, is developed. The framework accounts for multi-modal, dispersive and damped one dimensional propagation over long distances. The proposed model is applied to simulate a realistic guided wave-based inspection of a welded rail. The framework models the excitation, propagation and scattering of guided waves from welds by respectively employing a hybrid model that couples a 3D FEM model of a piezoelectric transducer with a 2D SAFE model of the rail; a 2D SAFE model of the rail; and another hybrid method which couples a 3D FEM model of the arbitrary discontinuity (weld) with two SAFE models of the rail to represent the semi-infinite incoming and outgoing waveguides. Optimal damping parameters for hysteretic and viscous damping, respectively, are determined using a model updating procedure to approximate attenuation in the rail. Good agreement between the experimental measurement and simulation is demonstrated, even for weld reflections originating over 640 m from the transducer location. The proposed physics-based framework can be used to efficiently perform multiple analyses considering different numbers and locations of welds, different excitation signals or to investigate the effects of changes in parameters such as transducer geometry, or material property variations caused by temperature fluctuations. The framework could therefore be used in future to set up a digital twin of a section of rail track, or in the development of a rail monitoring system by predicting reflections from defects which cannot readily be measured, but which can be simulated.