A socket-weld stub end is designed around the pipe bore, socket depth, and weld access. The pipe enters the socket, leaving room for a fillet weld around the joint. A small root gap helps reduce thermal-expansion stress, but it must be controlled during fit-up. Too little clearance can cause poor penetration. Too much can weaken the connection.
ASME B16.11 covers standard forged socket-weld fittings from NPS 1/8 through NPS 4. That range is useful when selecting a fitting, but it does not automatically define every custom stub-end geometry. Designers should check the specified pressure class, material, wall thickness, and end dimensions against the project piping requirements.
ASME B31.3 provides process-piping design rules for evaluating pressure and service conditions. Details matter.
In practice, the stub end should align cleanly with the mating pipe, without forcing the parts together. A mismatch can create uneven weld thickness or leave a hard-to-inspect crevice.
One design compromise is compactness: a short socket saves space, yet can make welding and inspection less forgiving.
I would verify the actual fit-up on a sample assembly, especially when pipe tolerances vary. A drawing alone may not reveal the problem.