  We report second-principles simulations on the structural and energetic
properties of domains in (PbTiO$_{3}$)$_{n}$/(SrTiO$_{3}$)$_{n}$ superlattices.
For the explored layer thickness ($n$ ranging between 8 and 16 unit cells) and
lateral sizes of the domains, the most stable configuration corresponds to
polar domains separated by a sequence of counter-rotating vortices
(clockwise/counterclockwise) perpendicular to the stacking direction and acting
as domain walls. The balance between the domain wall energy and the
electrostatic energy yields to an optimal domain period $\omega$ that is
proportional to the square-root of the thickness of the PbTiO$_{3}$ layer,
following the Kittel law. For a given lateral size of the simulation box,
suboptimal domain structures (with a width larger than the one predicted by the
Kittel law) can be obtained in a metastable form. However, at finite
temperature, molecular dynamics simulations show the spontaneous change of
periodicity, which implies the formation of new domains whose generation is
initiated by the nucleation of vortices and antivortices at the interface
between the SrTiO$_{3}$ and the PbTiO$_{3}$ layers. The vortices progressively
elongate and eventually annihilate with the antivortices yielding the formation
of new domains to comply the Kittel law via a topological phase transition.
