.. _linear_elasticity-rigid_twist:

linear_elasticity/rigid_twist.py
================================

**Description**


Linear elasticity example demonstrating use of the 'rigid_twist' LCBCs.

Find :math:`\ul{u}` such that:

.. math::
    \int_{\Omega} D_{ijkl}\ e_{ij}(\ul{v}) e_{kl}(\ul{u})
    = 0
    \;, \quad \forall \ul{v} \;,

and displacements in ``'RigidM'`` and ``'RigidS'`` regions are tied using the
:class:`RigidTwistOperator
<sfepy.discrete.fem.lcbc_operators.RigidTwistOperator>`.

Usage Examples
--------------

- Run with the default parameters::

    sfepy-run sfepy/examples/linear_elasticity/rigid_twist.py
    sfepy-view output/rigid_twist/cut-cylinder.*.vtk -f u:wu:f1:p0 1:vw:wu:f1:p0 1:vw:p0

- Use compression instead of tension, decrease top plane shift, tweak thread
  height parameter::

    sfepy-run sfepy/examples/linear_elasticity/rigid_twist.py -d solver=auto,shift=-0.01,thread=0.1,refine=0
    sfepy-view output/rigid_twist/cut-cylinder.*.vtk -f u:wu:f10:p0 1:vw:wu:f10:p0 1:vw:p0


.. image:: /../doc/images/gallery/linear_elasticity-rigid_twist.png


:download:`source code </../sfepy/examples/linear_elasticity/rigid_twist.py>`

.. literalinclude:: /../sfepy/examples/linear_elasticity/rigid_twist.py

