Why is enthalpy and not heat released by system used while calculating entropy of surroundings? While finding the sum of change in entropy of the universe and thus defining Gibbs free energy, why is the change in entropy of surrounding the negative of enthalpy of the system divided by the temperature?
I mean why are we considering the pressure to be constant ( thus considering enthalpy) in all systems while calculating Gibbs free energy ? Shouldn’t a more general form of entropy of surroundings be negative of heat released by system divided by the temperature?
I was thinking that maybe it is because all closed and open systems are constant pressure systems and change in entropy of surroundings is zero for isolated system but I don’t know, I am just guessing.
So, could someone please help me in understanding why enthalpy and not just heat in general is considered for any system while calculating Gibbs free energy?
Any help will be greatly appreciated!
Because $q=\Delta H$ only if only expansion work is done and the pressure of the system is constant. In that case, for an isothermal process, in which T is the same for system and surroundings, the entropy of the surroundings can be equated with the change in enthalpy divided by T. Which is why the applicability of the integrated formula $\Delta G = \Delta H -T \Delta S$ is restricted to constant p and T. You could write $q_p$ in place of $\Delta H$ the equation but only when work is restricted to pV work and when T and p are constant. It would not hold generally since sometimes work other than expansion work is performed. In general $\Delta H = q_p+w_\textrm{non-pV}$ at constant T and p.
To show this more explicitly, for a small (differential) change:
$$dU=dq+dw$$
$$dU=dq+dw_{\textrm{non-pV}}+dw_{\textrm{pV}}$$
$$dH = dU+d(pV) = dq+dw_{\textrm{non-pV}}+dw_{\textrm{pV}} + pdV+Vdp$$
At constant pressure of the system $dw_{\textrm{pV}}=-pdV$, $Vdp=0$ and
$$dH = dq+dw_{\textrm{non-pV}}$$
Further derivation is possible* to show how this relates to $G$, by assuming constant T and considering reversibility, but this should suffice to show that $dH$ and $dq$ (or $\Delta H$ and $q$) are not in general the same.

*For a reversible process $dq=TdS$ and
$$dH =  TdS+dw_{\textrm{non-pV,rev}}$$
Finally the differential expression for $G$ at constant $T$ follows (since then $dG=dH-d(TS)=dH-TdS$):
$$dG=dH - TdS = dw_{\textrm{non-pV,rev}} $$