Tubes with boiling are common elements of many processes. They appear in steam generators and refrigerators and many other systems. The behavior of such systems is complicated and many physical phenomena are involved. It has for example been observed that different types of instabilities can occur. In this paper we will discuss modeling of tubes with boiling. As an application we will discuss an instability phenomenon due to pressure oscillations that has been observed experimentally in many different situations. We will first derive a simple analytical model which is able to capture the oscillations qualitatively. The simple model also gives insight into the mechanisms that generate the oscillations. A more complicated model is then built using a recently developed model base library in Modelica. A comparison between the simple and the complicated model is also give