I want to verify a thought I had about Gibbs free energy. In some ways, I'm actually wondering why we are using enthalpy instead of the internal energy $U$. Right now, I'm thinking that enthalpy is mostly useful because reactions are done at constant pressure (in an open beaker). If we were to do our reactions at constant volume, we would actually use Helmholtz's free energy instead of Gibbs. My logic:
The definition of internal energy: $\Delta U = Q_\text{heat} - p\Delta V$
If we inject $Q_\text{heat}$ without holding the volume constant, we might change $U$ or $V$, which is a problem because we'll want to be able to describe our system as fully as possible. If we define the enthalpy:
$\Delta H = Q + V\Delta p$
Then, by keeping the pressure constant, we know that the heat added goes straight into this "enthalpy".
Afterwards, to know if a reaction is spontaneous, we need to see if the enthalpy-heat from a reaction overthrows the energy associated with the change in entropy.
Example: a molecule of two atoms wants to break apart. The bond has potential energy $Q_\text{heat} = \Delta H_0$ but it will increase the entropy by $Q_\text{entropy} = T \Delta S_0$. So, we check if:
$ Q_\text{heat} - Q_\text{entropy} > 0 $
$ \Delta H - T \Delta S > 0$
And thus Gibbs free energy was invented as:
$\Delta G = \Delta H - T \Delta S$
BUT, if we wanted to use a closed beaker, we would keep the internal energy U, and then to see if we had a spontaneous reaction, we would use Helmholtz's free energy:
$ \Delta F = \Delta U - T \Delta S $
I'm not sure about any of this and I'm mostly looking for confirmation/information of my logic. Please tell me if my intuition is wrong somewhere.