Add thermodynamic potentials

Not ready to be merged. Opening for comments/suggestions.
I have not done the partial derivative myself, clearly, but I assume that this makes some implicit assumptions about what depends on pressure.