Understanding Gibbs free energy 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} &gt; 0 $

$ \Delta H - T \Delta S &gt; 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.
Yes your logic is basically correct. 

Gibbs free energy is really derived is from the Clausius in equality which is: $$dS\geq \frac{dq}{T}$$ Basically is states that in a reaction, the change in entropy must always be equal (in the case of an ideal gas) or greater than the transfer of heat energy divided by temperature. Therefore, for a reaction to be spontaneous, the following relation must be satisfied: $$dS-\frac{dq}{T}\geq0$$ Now, lets consider two cases so we can simplify this relation. 

Constant Pressure

Enthalpy is given by: $$\Delta H_p = \Delta U + p\Delta V$$
and internal energy by: $$\Delta U = q + w$$
Now by substituting $\Delta U$ in the expression for enthalpy we get: $$\Delta H _p= q + w + p\Delta V$$ Now, since w = $-p\Delta V$, the above equation simplified so that: $$\Delta H_p = q$$ So, now in the Clausius inequality, we can substitute dq with dH and multiply by $T$ to get: $$TdS \geq dH$$ Now by integrating both sides and putting all the variables on one side, we get the question for gibbs free energy: $$\Delta G = \Delta H - T\Delta S$$ and hence this is why $\Delta G$ has to be negative for a reaction to be spontaneous

Constant Volume

At a constant volume, there is no expansion work done, therefore $dU = dq$
Therefore by using the same processes as before, we are able to get the expression for Helmholtz energy, A, which is defined as: $$\Delta A = \Delta U - T\Delta S$$ Here, for a reaction to be spontaneous, $\Delta A$ must be less than 0