Temperature, field and grain size dependence of flux pinning in high Tc superconductors