  Context. Ubiquitous small-scale vortical motions are seen to occur in the
solar atmosphere both in simulations and observations. They are thought to play
a significant role in the local heating of the quiet chromosphere and corona.
In a previous paper, we proposed a new method for the automated identification
of vortices based on the accurate estimation of curvature centers; this method
was implemented in the SWIRL algorithm. Aims. We aim to assess the
applicability of the SWIRL algorithm to self-consistent numerical simulations
of the solar atmosphere. The highly turbulent and dynamical solar flow poses a
challenge to any vortex-detection method. We also conduct a statistical
analysis of the properties and characteristics of photospheric and
chromospheric small-scale swirling motions in numerical simulations. Methods.
We applied the SWIRL algorithm to realistic, three-dimensional, radiative,
magneto-hydrodynamical simulations of the solar atmosphere carried out with the
CO5BOLD code. In order to achieve statistical validity, we analyzed 30 time
instances of the simulation covering 2 h of physical time. Results. The SWIRL
algorithm accurately identified most of the photospheric and chromospheric
swirls, which are perceived as spiraling instantaneous streamlines of the
horizontal component of the flow. Part of the identified swirls form
three-dimensional coherent structures that are generally rooted in magnetically
dominated intergranular lanes and extend vertically into the chromospheric
layers. From a statistical analysis, we find that the average number densities
of swirls in the photosphere and chromosphere are 1 Mm-2 and 4 Mm-2,
respectively, while the average radius is 50 - 60 km throughout the simulated
atmosphere. We also find an approximately linear correlation between the
rotational speed of chromospheric swirls and the local Alfv\'en speed.
(Abridged)
