  In this paper we perform the detailed numerical analysis of remagnetization
processes in nanocomposite magnetic materials consisting of magnetically hard
grains (i.e. grains made of a material with a high magnetocrystalline
anisotropy) embedded into a magnetically soft phase. Such materials are widely
used for the production of permanent magnets, because they combine the high
remanence with the large coercivity. We perform simulations of nanocomposites
with Sr-ferrite as the hard phase and Fe or Ni as the soft phase, concentrating
our efforts on analyzing the effects of ({\it i}) the imperfect intergrain
exchange and ({\it ii}) the non-spherical shape of hard grains. We demonstrate
that - in contrast to the common belief - the maximal energy product is
achieved not for systems with the perfect intergrain exchange, but for
materials where this exchange is substantially weakened. We also show that the
main parameters of the hysteresis loop - remanence, coercivity and the energy
product - exhibit non-trivial dependencies on the shape of hard grains, and
provide detailed explanations for our results. Simulation predictions obtained
in this work open new ways for the optimization of materials for permanent
magnets.
