The existing gap cooling studies have shown the coolability of debris retained in the lower head of a vessel and effective mitigation of the rupture of a reactor vessel, but no plausible mechanism of the gap formation has been clearly identified. Several experiments of the gap formation, pretests of FARO-19, LAVA, ALPHA, and EC-FOREVER-5 and 6, were reviewed to find out the mechanism of the gap formation. We confirmed that a preflooded condition, in which a simulant of a reactor vessel is filled with water before pouring a melt to the vessel, makes it possible to form the gap. We performed simple tests to pour a melt onto a plate under both pre-flooded and dry conditions discovering the gap formation under the pre-flooded condition. We proposed a model for the initial gap thickness considering the Inverse Leidenfrost effect. The initial gap thickness is estimated solving the balance equations for mass, momentum, and energy. For the estimation of the transient gap thickness, we considered the thermal fracture as well as the thermal contraction of the crust. For the estimation of the thermal fracture of a melt, we adopted Yeo and No's study (Yeo and No, 2019) considering the crust cracks of a melt being cooled down under the flooded condition. The proposed model was validated against experimental data of the KAIST test, ALPHA tests performed at JAERI, and LAVA-6, LAVA-10, LMP200-1, and LMP200-2 tests performed at KAERI. The current model predicts the gap thicknesses much better than the existing approach with the linear thermal contraction model and the assumed initial gap size but no consideration of the crust crack formation. Also, it well agreed against the experimental data.