  We use high-resolution cosmological simulations that include the effects of
gasdynamics and star formation to investigate the origin of the Tully-Fisher
relation in the standard Cold Dark Matter cosmogony. Luminosities are computed
for each model galaxy using their full star formation histories and the latest
spectrophotometric models. We find that at z=0 the stellar mass of model
galaxies is proportional to the total baryonic mass within the virial radius of
their surrounding halos. Circular velocity then correlates tightly with the
total luminosity of the galaxy, reflecting the equivalence between mass and
circular velocity of systems identified in a cosmological context. The slope of
the relation steepens slightly from the red to the blue bandpasses, and is in
fairly good agreement with observations. Its scatter is small, decreasing from
\~0.45 mag in the U-band to ~0.34 mag in the K-band. The particular
cosmological model we explore here seems unable to account for the zero-point
of the correlation. Model galaxies are too faint at z=0 (by about two
magnitudes) if the circular velocity at the edge of the luminous galaxy is used
as an estimator of the rotation speed. The Tully-Fisher relation is brighter in
the past, by about ~0.7 magnitudes in the B-band at z=1, at odds with recent
observations of z~1 galaxies. We conclude that the slope and tightness of the
Tully-Fisher relation can be naturally explained in hierarchical models but
that its normalization and evolution depend strongly on the star formation
algorithm chosen and on the cosmological parameters that determine the
universal baryon fraction and the time of assembly of galaxies of different
mass.
