Numerical methods to model dynamics of springs