This has confused me for a long time now. Why do we compute Gibbs free energy when we figure out the spontaneity of a reaction involving gases? In my mind, I envision a reaction involving gases to be always in a closed container, which would clearly change the pressure of the gas, but it seems to be that constant pressure is a requirement for using Gibbs free energy.
Now if it is that we are supposed to assume that the reaction involving gases does not occur in a closed container, why do we use molar concentration of gases when computing equilibrium constants? In this situation, it seems to be that volume of gases will change.
I'm suspecting that most of my confusion is on what constant pressure actually means in a reaction, so as a third question, what does constant pressure mean when we are referring to a reaction?