  Numerical methods for the simulation of cavitation processes have been
developed for more than 50 years. The rich variety of physical phenomena
triggered by the collapse of a bubble has several applications in medicine and
environmental science but requires the development of sophisticated numerical
methods able to capture the presence of sharp interfaces between fluids and
solid/elastic materials, the generation of shock waves and the development of
non-spherical modes. One important challenge faced by numerical methods is the
important temporal and scale separation inherent to the process of bubble
collapse, where many effects become predominant during very short time lapses
around the instant of minimum radius when the simulations are hardly resolved.
In this manuscript, we provide a detailed discussion of the parameters
controlling the accuracy of direct numerical simulation in general
non-spherical cases, where a new theoretical analysis is presented to
generalize existing theories on the prediction of the peak pressures reached
inside the bubble during the bubble collapse. We show that the ratio between
the gridsize and the minimum radius allows us to scale the numerical errors
introduced by the numerical method in the estimation of different relevant
quantities for a variety of initial conditions.
