  We investigate the elongation and breaking process of metallic nanowires
using the ultimate jellium model in self-consistent density-functional
calculations of the electron structure. In this model the positive background
charge deforms to follow the electron density and the energy minimization
determines the shape of the system. However, we restrict the shape of the wires
by assuming rotational invariance about the wire axis. First we study the
stability of infinite wires and show that the quantum mechanical
shell-structure stabilizes the uniform cylindrical geometry at given magic
radii. Next, we focus on finite nanowires supported by leads modeled by
freezing the shape of a uniform wire outside the constriction volume. We
calculate the conductance during the elongation process using the adiabatic
approximation and the WKB transmission formula. We also observe the correlated
oscillations of the elongation force. In different stages of the elongation
process two kinds of electronic structures appear: one with extended states
throughout the wire and one with an atom-cluster like unit in the constriction
and with well localized states. We discuss the origin of these structures.
