Development of a three-dimensional numerical model of grain boundaries in highly doped polycrystalline silicon and applications to solar cells