  Using contact geometry we give a new characterization of a simple but
important class of thermodynamical systems which naturally satisfy the first
law of thermodynamics (total energy preservation) and the second law (increase
of entropy). We completely clarify its qualitative dynamics, the underlying
geometrical structures and we show how to use discrete gradient methods.
