# Why Gibbs free energy is equating to 0?

I have studied thermodynamics, in which the infamous Gibbs equation came.

$$\mathrm{d}G = \mathrm{d}H - T\,\mathrm{d}S$$

Then my book said the criteria of spontaneity based on gibbs energy is at constant pressure and temperature.

Since $T\,\mathrm{d}S = q = \mathrm{d}H$ (since at constant pressure $\mathrm{d}H = q$), shouldn't $\mathrm{d}G$ all always be equal to $0$?

• This is quite a different kind of dS. Dec 22, 2016 at 13:41
• Can you please elaborate? Dec 22, 2016 at 13:42
• dS in TdS=q is the enthropy change of a system upon introducing some heat. dS in Gibbs is the enthropy change during a chemical reaction. Dec 22, 2016 at 14:36

That is not the Gibbs Free Energy at constant pressure and temperature.

Alphabetic soup definitions:

• $G$ - Gibbs free energy
• $H$ - enthalpy
• $T$ - temperature
• $S$ - entropy
• $P$ - pressure
• $V$ - volume
• $w$ - work
• $q$ - heat
• $U$ - internal energy

Definition of $G$ is $$G = H - TS$$

Definition of $H$ is $$H = U + PV$$

The total differential of $G$ is

$$dG = dU + PdV + VdP - TdS - SdT$$

The definition for the change in $U$ is $$dU = dq + dw$$

There are two kinds of work: pressure-volume work (pv) and non-pressure-volume work (non-pv)

$$dw = dw_{\mathrm{pv}} + dw_\mathrm{non-pv}$$

Thus, substituting we get

$$dG = dq - PdV + dw_\mathrm{non-pv} + PdV + VdP - TdS - SdT$$

If the process is (approximately) reversible: $$T =\dfrac{dq}{dS}$$

Substituting $q = TdS$ and simplifying, we get:

$$dG = VdP - SdT + dw_\mathrm{non-pv}$$

At constant pressure, $dP=0$, and at constant temperature $dT = 0$.

Therefore: $$dG = dw_\mathrm{non-pv}$$

Hence, Gibbs free energy is sort of a measure of useful work we can get out of a system.

$$w_\mathrm{non-pv\ by\ system} = - w_\mathrm{non-pv\ on\ system}$$

• Um what do u mean by pv and non pv? Dec 22, 2016 at 13:47
• Pv work means pressure work, like F.ds is work, P.dv is work. Any other sort like electrical or gravitational work comes under non pv Dec 23, 2016 at 2:10
• Hello @Mrigank, so I can define the Gibbs free energy also when the temperature and the pressure are not constants?| Sorry for the banal question. Nov 14, 2019 at 21:05

Although the answer @ELiT gave is the perfect answer, I would like to answer my own question. What a silly mistake I made!

$\mathrm{d}S = \frac{q}{T}$ only for reversible processes. In reversible processes, what I said is true, as $\mathrm{d}S_\text{total} = 0$, thus $\mathrm{d}G = 0$. But $\mathrm{d}S \neq \frac{q}{T}$ for non-reversible processes. Hence I cannot substitute that value here.

• Please use MathJax to typeset mathematical expressions! Dec 22, 2016 at 15:10
• @getafix Sorry. I am on my mobile, and it is really hard for me to do so. Ill edit it once my computer is fixed Dec 22, 2016 at 15:11