I am working on a DIY project and want to understand the system/mathematical model of a traditional steam espresso machine. How I have started to think about the problem is a closed container with liquid and gas. At room temperature I know the vapor pressure of the water. As I increase the temperature the volume will stay the same. When the temperature increases the vapor pressure will also increase but at the same time the pressure of the gas should follow the ideal gas law. I am assuming for simplicity reasons that the liquid volume is not changing (the liquid to gas change is insignificant and the liquid won't compress). Once the pressure/temperature reaches a set level the valve is opened. At this stage the temperature remains constant but the pressure decreases and volume increases. Can I get help finding the equations during these different states to describe and calculate the system of the liquid and gas in the closed container (temperature and pressure based on the volume)?