Add thermodynamic potentials

Not ready to be merged. Opening for comments/suggestions.
We branched during CIDER. It's easy enough to remove the lines.