This was posted on the forum while back
Document on Pro Mechanica. WF2
refer to Chapter 13-41
Don't forget that there are excellent and broadly equivalent resources on the support site together with the model and first part of the example above.
Regards