Numerical analysis of the plasma-material interaction during the thermal quench phase of tokamak disruptions