  Systematic microstructure design requires reliable thermodynamic descriptions
of each and all microstructure elements. While such descriptions are well
established for most bulk phases, thermodynamic assessment of crystal defects
is challenged because of their individualistic nature. In this paper, a model
is devised for assessing grain boundary thermodynamics based on available bulk
thermodynamic data. We propose a continuous relative atomic density field and
its spatial gradients to describe the grain boundary region with reference to
the defect-free, homogeneous bulk and derive the grain boundary Gibbs free
energy functional. Grain boundary segregation isotherm and phase diagram are
computed for a regular binary solid solution, qualitatively discussed for the
Pt-Au system. The relationships between the grain boundary's atomic density,
excess free volume, and misorientation angle are discussed. Combining the
current density-based model with available bulk thermodynamic databases
capacitates constructing databases, phase diagrams, and segregation isotherms
for grain boundaries, opening possibilities for studying and designing
heterogeneous microstructures.
