Hi again!

I found the answer to my problem. I post it here, maybe it helps someone else.

Define the magnet as solid ring, so, without any seperations. Goto Project->Datasets and define the magnetization pattern. The values for phi on the x- axis and the amplitude (1 and -1) on the y- axis. The name of the dataset needs to start with a $, so the name would be something like $Mag_trapz. Clone an arbitrarly magnet in the material editor, set the values for Br and Hc as needed. Change the coordinate system type to cylindrical. Write -Hc*pwl_periodic($Mag_trapz,2*Phi/pi*180) in the magnitude field of the magnetic coercivity, of course Hc has to be replaced by it's value. I defined the x- axis of $Mag_trapz in electrical degree, Phi is in rad, so, it has to be converted. Phi is the mechanical angle, so with the factor of two (the number of pole pairs) it is converted to electrical degree.

All the best