If you boil a liquid with latent heat $L$ in a container of infinite volume (i.e. open to the universe) the heat required is: $$Q=Lm$$ Where $m$ is the mass of the liquid boiled. If however you boil it in a container of finite volume, $V$, the heat required is: $$Q=Lm-V\Delta p$$ Where $\Delta p$ is the change in pressure. By what physical mechanism is the system given the heat $V \Delta p$ back to the surrounding and why?
Let me explain my reasoning behind the formula $Q=Lm-V\Delta p$. By definition the latent heat of vaporization is the difference in the enthalpy's between the evaporated gas and the liquid i.e. $$Lm=H_2-H_1$$ But $H_i=U_i+p_i V$ for $i=1,2$ therefore: $$Lm=(U_2+p_2V)-(U_1+p_1V)$$ $$Lm=\Delta U + V\Delta p$$ And thus: $$\Delta U=Lm-V\Delta p$$ In our case there is no work been done on the system from the surroundings and hence the change in internal energy must solely be provided by the addition of heat energy. This means that the heat energy required for this change is: $$Q=Lm-V\Delta p$$
I think there is a related concept here, that is worth noting. Take a system at $T_1, p_1, V_1$ and change it to the state $T_2, p_1, V_2$ via a reversible change. I am guessing we would all agree that the heat supplied to the system is given by: $$Q=C_p (T_2-T_1)$$ But the internal energy is given by: $$dU=dQ-pdV$$ So the change in internal energy is given by: $$U=C_p(T_2-T_1)-p_1(V_2-V_1)$$ Now again starting at $T_1, p_1, V_1$ and finishing at $T_2, p_1, V_2$ we instantaneously (e.g. by opening a tap) increase the volume from $V_1$ to $V_2$. Then act to change the temperature since no work is done on the system at any stage the heat applied must equal the change in internal energy of the system, i.e. $$Q_2= C_p(T_2-T_1)-p_1(V_2-V_1)$$ Of course this is exactly the same argument as above, but I think using heat capacities simplifies it intuitively.