This paper describes a modelling framework for the description of thermodynamic systems with phase transitions. It is shown that these systems can be conveniently described within the framework of (regional) hybrid systems. A hybrid optimal control problem for a particular class of van der Waals type systems with the liquid-gas phase transition is analized in detail.