We consider three-dimensional axially symmetric quantum wires with circular cross-sections whose radius may vary along the axis of the waveguide. In the narrows, there arise barriers to the longitudinal motion of an electron. Varying the radius, one can create barriers and provide conditions for resonant tunnelling of electrons. We suggest a method for numerically studying such phenomena. The method can be applied to wires not possessing axial symmetry as well. Besides this, we discuss some possible applications.