The CONTACT library for MATLAB®, Fortran and C

The CONTACT library for MATLAB®, Fortran and C provides full access to the computational core of CONTACT from the MathWorks® MATLAB® software. The same library can be integrated in ones own Fortran or C programs as well. This allows to build ones own model in an easy way on the basis of building blocks provided by the library.

results of CONTACT add-on

Separate building blocks are used such as cntc_settrackdimensions and cntc_setrailprofile for setting the track geometry and rail profile(s), cntc_setmaterialproperties for setting the material parameters, cntc_setgriddiscretization for the grid discretization, and so on. Then the actual solution process is started with cntc_calculate, and the results may be retrieved using cntc_getcontactlocation, cntc_getcontactforces, cntc_gettractions and cntc_getmicroslip.

Main benefits

  • Building your own programs using CONTACT's algorithms: fast, robust and versatile;
  • accessing all of CONTACT's features through an easy interface;
  • allowing each case to be built on previous results;
  • application in transient, dynamic scenarios.


The library provides all features of the input-file, without using an input-file:

  • module 1 for wheel/rail contact, and module 3 for basic contact situations;
  • options T=1, 2 and 3 for shifts, transient and steady rolling;
  • options L=0 to 4 for Coulomb friction and the velocity-dependent friction laws;
  • options M=0 to 4 for linearly elastic and viscoelastic materials, with optional interfacial layer;
  • options IBASE=1 to 9 for the undeformed distance specification, Hertzian or non-Hertzian;
  • full control over the creepage and/or the total force.

More information

If you're interested in finding out more, fill in your questions in the following form. We will then contact you on the e-mail address as indicated below.

Cattaneo to Carter testproblem:

results of CONTACT library

Initiation of rolling, dynamic:

results of CONTACT library

(* required fields).