Lattice dynamics studies of grain boundary structures: II. Thermodynamic functions