Numerical study of the dynamic processes in volcanic eruptions: Bubble dynamics and volatiles diffusion