SUMMARYA new finite element tool is presented, which utilises the extended FEM (XFEM) to model leaks through cracks. Heat flux and pressure boundary conditions are imposed on the crack in the form of jump terms. Enrichments are chosen to model either strong or weak discontinuities across the crack, as well as singularities at the crack tips. Excellent convergence rates are achieved for both the thermal and mechanical models, where errors are calculated relative to analytical solutions derived for this specific problem. A more general temperature approximation is also presented, which makes no assumptions about the continuity of temperature or heat flux across the crack. Results indicate that this is a robust way of modelling the temperature of a plate containing a crack with or without a leaking fluid. Thermomechanical simulations were then carried out to demonstrate the applicability of the FEM for analysing leak rates in nuclear reactor primary pipework. A two-phase flow model based on the Henry-Fauske model is chosen for the fluid aspect, and this is coupled to the structure through a convection law. Crack closure is shown to reduce the leak rate by up to 40%.