  The quantum size oscillations of the energetic properties and the elongation
force of the gold slabs and wires, isolated and in a contact with electrodes,
are calculated in a free-electron model. A simple relation between the Fermi
energy and the square-potential-well depth is used and tested for
low-dimensional systems. It is shown that considering the electron subsystem of
a slab (or wire) in a contact as open one, the contact acts like a sort of
electron pump which sucks or pumps out electrons from the sample. The effect of
the contact potential difference on the elastic force oscillations is
considered. The calculated amplitudes of force oscillations are in a
qualitative agreement with those observed experimentally.
