I implemented a velocity verlet algorithm, and use it to simulate movement of particles. Depending on the parameters, sometimes the simulation of the movment of the particles is stable, while other times, the simulation may go haywire and the position of the particles becomes exponential. Is there a way to prevent unstable simulation? Is there any verlet algorithm that guarantees stability? E.g. a regularization parameter in the verlet algo? Or should I try constraint algorithm? I have a look at constraint algorithm, it seems that the distance between two particles is fixed to a constraint. Does constraint algorithm allows a maximum threshold, i.e. the distance between two particles cannot exceed a threshold? Thank you for your help.