Numerical simulation of the effect of constraints on welding deformations and residual stresses in a pipe–flange joint