Hi Akshay,
thanks a lot for this information. it worked :)
any chance you would also happen to have insight about further modifying this snippet such that the friction coefficient can be defined as function of relative velocity after the decay from static to dynamic, as shown below. That is, the viscous friction part where coefficient u = K*Vrelative

Thank you.