Please find attached the C++ code needed to add contact forces to the model.