Examples
The directory examples/ in Tamaas’ root repository contains example scripts
dedicated to various aspects of Tamaas:
statistics.pyThis script generates a rough surface and computes its power spectrum density as well as its autocorrelation function.
rough_contact.pyThis script generates a rough surface and solves an adhesion-less elastic contact problem.
adhesion.pyThis script solves a rough contact problem with an exponential energy functional for adhesion. It also shows how to derive an energy functional in python.
saturation.pyThis script solves a saturated contact problem (i.e. pseudo-plasticity) with a rough surface.
stresses.pyThis script solves an equilibrium problem with an eigenstrain distribution and a surface traction distribution and writes the output to a VTK file. It demonstrates how the integral operators that Tamaas uses internally for elastic-plastic contact can be used directly in Python.
plasticity.pyThis script solves an elastoplastic Hertz contact problem with three load steps and writes the result to VTK files.
scipy_penalty.pyThis script shows how to implement a contact solver in python that uses the contact functionals of Tamaas. Here we use Scipy’s
scipy.optimize.minimize()function to solve a contact problem with penalty.nonperiodic.pyThis script shows how to solve a non-periodic problem and compute the true surface interference
viscoelastic_contact.pyThis script solves a viscoelastic contact problem with a rough surface.