  Context. The classical "planetesimal" accretion scenario for the formation of
planets has recently evolved with the idea that "pebbles", centimeter- to
meter-sized icy grains migrating in protoplanetary disks, can control
planetesimal and/or planetary growth.
  Aims. We investigate how pebble accretion depends on disk properties and
affects the formation of planetary systems
  Methods. We construct analytical models of pebble accretion onto planetary
embryos that consistently account for the mass and orbital evolution of the
pebble flow and reflect disk structure.
  Results. We derive simple formulas for pebble accretion rates in the
so-called "settling" regime for planetary embryos with more than 100 km in
size. For relatively smaller embryos or in outer disk regions, the accretion
mode is 3D, meaning that the thickness of the pebble flow must be taken into
account, and resulting in an accretion rate that is independent of the embryo
mass. For larger embryos or in inner regions, the accretion is in a 2D mode,
i.e., the pebble disk may be considered to be infinitely thin. We show that the
radial dependence of the pebble accretion rata is different (even the sign of
the power-law exponent changes) for different disk conditions such as the disk
heating source (viscous heating or stellar irradiation), the drag law (Stokes
or Epstein, and weak or strong coupling), and in the 2D or 3D accretion modes.
We also discuss the effect of the sublimation/destruction of icy pebbles inside
the snow line.
  Conclusions. Pebble accretion easily produces a large diversity of planetary
systems. In other words, to correctly infer the results of planet formation
through pebble accretion, detailed prescriptions of disk evolution and pebble
growth, sublimation/destruction and migration are required.
