The influence of long-range residual stress on plastic collapse of pressurised pipes with and without flaws