Instead of writing a scenario, this macro will directly mesh and solve the project to generate the torque at given speed.

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: Boolean for establishing heavier mesh for more accurate results
  • 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
  • ROTATIVE_SPEED: Speed at simulation is running
  • GAMMA: control angle
  • MAX_CURRENT: maximum value of the three-phase system
  • NBT: number turn of the coil
  • R: resistivity of the material of the winding
  • MD: mass density of the material of the winding


  • The simulation of the torque at a specific speed considering the inputs