Non-expert summaryThe structure of many biofilms results in a surface layer which does not detach readily and a growing layer that detaches (sloughs) off more readily. The authors present a general method for describing biomass detachment in a multidimensional biofilm modelling framework. Biomass losses from processes acting on the entire surface of the biofilm, such as erosion, are modelled, and discrete detachment events, i.e. sloughing, are implicitly derived from the simulations. This methodology for biomass detachment was integrated with multidimensional (2D and 3D) particle-based multispecies biofilm models by using the level set method. Application of the method is demonstrated by looking at the trends in biofilm structure and activity over time in two case studies: I - a simple model considering uniform biomass; II - a model discriminating biomass composition in heterotrophic active mass, extracellular polymeric substances (EPS) and inert mass.