.. _linear_elasticity-two_bodies_contact: linear_elasticity/two_bodies_contact.py ======================================= **Description** Contact of two elastic bodies with a penalty function for enforcing the contact constraints. Find :math:\ul{u} such that: .. math:: \int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u}) + \int_{\Gamma_{c}} \varepsilon_N \langle g_N(\ul{u}) \rangle \ul{n} \ul{v} = 0 \;, \quad \forall \ul{v} \;, where :math:\varepsilon_N \langle g_N(\ul{u}) \rangle is the penalty function, :math:\varepsilon_N is the normal penalty parameter, :math:\langle g_N(\ul{u}) \rangle are the Macaulay's brackets of the gap function :math:g_N(\ul{u}) and .. math:: D_{ijkl} = \mu (\delta_{ik} \delta_{jl}+\delta_{il} \delta_{jk}) + \lambda \ \delta_{ij} \delta_{kl} \;. Usage examples:: ./simple.py examples/linear_elasticity/two_bodies_contact.py --save-regions-as-groups --save-ebc-nodes ./postproc.py two_bodies.mesh.vtk -b --wire ./postproc.py two_bodies.mesh.vtk -b --wire -d 'u,plot_displacements,rel_scaling=1.0' ./script/plot_logs.py log.txt ./postproc.py --wire two_bodies.mesh_ebc_nodes.vtk ./postproc.py --wire two_bodies.mesh_regions.vtk .. image:: /../doc/images/gallery/linear_elasticity-two_bodies_contact.png :download:source code  .. literalinclude:: /../examples/linear_elasticity/two_bodies_contact.py