  This paper is an extended version of an article accepted for publication in
Physical Review E. Besides its fundamental interest, the model that we
investigate in this article is simple enough to be used as a basis for courses
or tutorials on the thermodynamics of out of equilibrium systems. It allows
simple numerical calculations and analytical analysis which highlight important
concepts with an easily workable example. This version includes studies of fast
cooling and heating, exhibiting cases with negative heat capacity, and further
discussions on the entropy which are not presented in the Physical Review E
version.
  Glasses are interesting materials because they allow us to explore the
puzzling properties of out-of-equilibrium systems. One of them is the Kovacs
effect in which a glass, brought to an out-of-equilibrium state in which all
its thermodynamic variables are identical to those of an equilibrium state,
nevertheless evolves, showing a hump in some global variable before the
thermodynamic variables come back to their starting point. We show that a
simple three-state system is sufficient to study this phenomenon using
numerical integrations and exact analytical calculations. It also brings some
light on the concept of fictive temperature, often used to extend standard
thermodynamics to the out-of-equilibrium properties of glasses. We confirm that
the concept of a unique fictive temperature is not valid, an show it can be
extended to make a connection with the various relaxation processes in the
system. The model also brings further insights on the thermodynamics of
out-of-equilibrium systems. Moreover we show that the three-state model is able
to describe various effects observed in glasses such as the asymmetric
relaxation to equilibrium discussed by Kovacs, or the reverse crossover
measured on $B_2O_3$.
