Thermodynamics of grain-boundary phases | Synapse