$$\Delta U = \Delta H - p\,\Delta V$$
Consider a gaseous system in a container with a frictionless piston, and a pressure outside the container.
Is the pressure outside the container assumed to always be constant?
Is the pressure inside the container assumed to always be constant? I assume no looking at the graph of Boyle's Law.
For expansion of the gas, work is done by the system (i.e. the gas in the container) on the surroundings, so is $p$ the pressure of the surroundings as work is done against the pressure of the surroundings?
This doesn't seem to be the case in several examples in my lecture notes: e.g. calculate the work done against pressure of 1 bar at 298 K when 1 mol of zinc is dissolved in aq. HCl.
Here, work is being done against the pressure of the surroundings, so I'd expect $p$ = pressure of surroundings. However, the notes say 'consider $p(\Delta V) = (\Delta n)RT$' and proceeds to input the number of moles of hydrogen gas. So here $p$ is taken as pressure of the hydrogen gas produced.
- For compression of the gas, work is done by the surroundings on the system, so is $p$ the pressure of the gas in the container as work is done against this pressure?