chairats,
I am assuming you want to know how to do contact analyses rather than learn about the programing.
The following book is really about contact mechanics and is a good place to start:
K L Johnson, 'Contact Mechanics', Cambridge University Press.