Simulations of grain-boundary structure