Improvement of the detachment modelling in the SONIC simulation