This paper presents an optimization procedure for the design of circular ma
gnets of multipolar symmetry in the presence of an iron screen. The procedu
re is based on the combined use of field calculations and optimization tech
niques and can be applied when the field is generated either by a distribut
ion of currents or of magnetic materials. The numerical optimization techni
que uses the positions and/or orientations of the field generating elements
as parameters (currents or permanent magnets). The technique has proved to
be very effective in obtaining a good uniformity of field in a large fract
ion of the magnet volume. It should reduce the subsequent shimming operatio
ns. The method is almost completely automatic and simpler than other standa
rd methods normally used to design new magnet geometries which are based on
field calculation programs and 'manual' optimization procedures.