This macro gives to the users the possibility to create an AFIR geometry adapted for thermal simulation, with almost all combinations of poles pairs and slots, while editing most of the geometric parameters.

Note: For more details about this macro, consult this additional document
Note: This macro must be only used AFTER loading INIT_AFIR; it is loaded automatically after loading INIT_AFIR. So, don’t load it directly with a blank project.


  • Ri: Inner radius rotor
  • Ro: Outer radius rotor
  • Ly: Rotor yoke length
  • P: Number of pairs poles
  • SPM: space between magnets
  • H: Height magnet
  • LM: Length of magnet
  • NS: Number of slots
  • HS: Height slots
  • TH: Thickness yoke stator
  • HIS: Height of end slots
  • OS: Opening slot
  • W1: Width slot
  • W2: Space between slots and radius slots
  • GAP: Airgap


  • Creation of geometrics parameters put as inputs and the parameters related
  • Generation of AFIR geometry considering the inputs