This work is to predict collapse of the molten layer surrounding the keyhole filled with vapor and droplets during drilling or high power density beam welding process. Investigating collapse of the liquid layer is essentially required for an understanding of pore formation in keyhole welding. The collapse of the keyhole is similar to transition between the slug and annular two-phase flows encountered in fluid flow field. In this study, a steady, averaged one-dimensional model widely used in two-phase flow areas is provided. The mixture in the core is treated as a homogeneous fluid. For the sake of clarification, friction induced by the liquid layer and energy absorbed by the vapor are neglected. It shows that, in contrast to insensitive effects of subsonic Mach number, the keyhole subject to supersonic Mach number at the base is readily enclosed or collapsed. A fundamental understanding of pore formation is revealed.