The evolution of pore and grain structure in a nuclear fuel environment is strongly influenced by the local temperature, and the temperature gradient. The evolution of pore and grain structure in an externally imposed temperature gradient is simulated for a hypothetical material using a Potts model approach that allows for porosity migration by mechanisms similar to surface, grain boundary and volume diffusion, as well as the interaction of migrating pores with stationary grain boundaries. First, the migration of a single pore in a single crystal in the presence of the temperature gradient is simulated. Next, the interaction of a pore moving in a temperature gradient with a grain boundary that is perpendicular to the pore migration direction is simulated in order to capture the force exerted by the pore on the grain boundary. The simulations reproduce the expected variation of pore velocity with pore size as well as the variation of the grain boundary force with pore size.