In order to evaluate the machine-protection systems for existing and future high-energy and high-intensity accelerators, the consequences of beyond-design failures have to be considered. This includes the consequences of an accidental, direct impact of a large number of high-energy particles in one location. In this case, an effect known as hydrodynamic tunnelling can significantly increase the damage range in the material. The effect is caused by the beam-induced reduction of the material density along the beam axis, which allows subsequent bunches to penetrate deeper and deeper into the target. To account for the changing material density during the beam impact, the state-of-the-art solution consists in the sequential coupling of an energy-deposition code like FLUKA and a hydrodynamic code like Autodyn. It, thus, requires running the two codes in a loop, re-computing the energy deposition and target densities for each simulation step.