# Basic Thermodynamics

The Helmholtz free energy \(A (N, V, T ) \) is a natural function of \(N, V \) and \(T\). The isothermal-isobaric ensemble is generated by transforming the volume \(V\) in favor of the pressure \(P\) so that the natural variables are \(N\), \(P\), and \(T\) (which are conditions under which many experiments are performed, e.g., `standard temperature and pressure'.

Performing a Legendre transformation of the Helmholtz free energy

\[ \tilde{A}(N,P,T) = A(N,V(P),T) - V(P) \frac {\partial A}{\partial V}\]

But

\[ \frac {\partial A}{\partial V} = -P\]

Thus,

\[\tilde{A}(N,P,T) = A(N,V(P),T) + PV \equiv G(N,P,T)\]

where \(G (N, P, T ) \) is the Gibbs free energy.

The differential of \(G\) is

\[ dG = \left(\frac {\partial G}{\partial P}\right)_{N,T} dP+ \left(\frac {\partial G}{\partial T}\right)_{N,P} dT+ \left(\frac {\partial G}{\partial N}\right)_{P,T} dN\]

But from \(G = A + PV \), we have

\[ dG = dA + PdV + VdP \]

but \(dA = - SdT - PdV + \mu dN \), thus

\[ dG = - SdT + VdP + \mu dN \]

Equating the two expressions for \(dG\), we see that

\[V=\left(\frac {\partial G}{\partial P}\right)_{N,T}\]

\[S=-\left(\frac {\partial G}{\partial T}\right)_{N,P}\]

\[\mu=\left(\frac {\partial G}{\partial N}\right)_{P,T}\]