  \begin{abstract}
  We have studied magnetic properties of water-quenched 5 wt.% (Fe, Ti)
particle-doped MgB$_2$ comparing with that of air-cooled one. Generally, grain
refinement is achieved by increasing cooling rate, which implies an increase of
grainboundaries in the superconductor. Here we show that increased
grainboundaries influence what kinds of effects on the field dependence of
magnetization and what is the mechanism. As a result, they are served as a
pinning center at a high field whereas they are served as a pathway to
facilitate the movement of fluxes pinned on volume defects at a low field. As
modeling grainboundaries in a superconductor, we explained that they had a flux
pinning effect as well as the flux-penetrating promotion effect. As temperature
increases, the pinning ability of a grainboundaries decreases, which was caused
by increased coherence length. Stacking fault planes and twin boundaries have
also been considered by using the model. It explained the reason for that
stacking fault planes of MgB$_2$ do not have any pinning effect and the twin
boundary of HTSC have the strong pinning or strong flux-penetration effect
depending on the direction of the applied field.
