Instead of writing a scenario, this macro will directly mesh and solve the project to generate the back EMF and/or the cogging torque.

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.


  • PROJECT_NAME: the project in which the simulation will be saved
  • COGGING_TORQUE: establishing or not an adapted mesh to calculate the cogging torque
  • Option to mesh or not the project
  • STEP: value at which the rotor position is incremented
  • MAXVALUE: the simulation stops at this position of the rotor
  • MINVALUE: the simulation begins at this position of the rotor
  • NBT: number turn of the coil
  • ROTATIVE_SPEED: Speed at simulation is running


  • The Back EMF of the project and, if the user has decided, the cogging torque