Is electrical work equal to the change in enthalpy or internal energy?


> 
> A $\pu{0.5 A}$ current from a $\pu{20 V}$ supply is passed through a water sample. $\pu{0.9 g}$ of water is vapourised at $p = \pu{1 atm}$ and $T = \pu{373 K}$. Calculate $\Delta U$ and $\Delta H$ for the vapourisation of $\pu{1 mol}$ of water. 
> 
> 
> 


The flow of current is doing work on the system:


$$w = Vq = VIt$$


where $w$ is work, $V$ is voltage, and $q$ is charge, $I$ is current, and $t$ is time. I thought that the work done, $w$, will be equal to the change in internal energy:


$$\Delta U = w$$


From this, I could calculate $\Delta H$ using the relation


$$\Delta H = \Delta U + \Delta n\_g RT$$


where $\Delta n\_g$ denotes the number of moles of gaseous products minus number of moles of gaseous reactants. Here we are assuming that water vapour behaves as an ideal gas and that the volume of the liquid is negligible compared to the volume of gas formed.


**My issue** is that, according to the solution, the work done is equal to $\Delta H$, not $\Delta U$.


It got me thinking about how enthalpy is equal to heat supplied at constant pressure, which could provide the energy for vapourisation, much like the electrical work in this case.


Why is $w = \Delta H$ and not $w = \Delta U$?




In this problem, there are two types of work that are done, and no heat Q is transferred. The two types of work are VIt and $P\Delta V=(\Delta n)R T$. So the change in internal energy is $$\Delta U=VIt-P\Delta V$$So the change in enthalpy is: $$\Delta H=\Delta U+\Delta (PV)=VIt$$


 1