add_gear_mating

add_gear_mating(master: GearBase, slave: GearBase, efficiency: float | int) None

It creates a gear mating between two existing gears. This mating is used to compose the Powertrain.

The ratio of the angular speed of the master gear over the angular speed of the slave gear is equal to the ratio of the slave gear number of teeth over the master gear number of teeth.

The master gear is closest to the motor and transfers a fraction of the driving torque to the slave one, based on the efficiency value: the higher the efficiency, the higher the fraction of transferred driving torque.

Parameters

masterGearBase

Driving gear. It must be an instance of GearBase.

slaveGearBase

Driven gear. It must be an instance of GearBase.

efficiencyfloat or int

Mechanical efficiency of the gear mating. It must be a float or an int between 0 and 1.

Raises

TypeError
  • If master is not an instance of GearBase,

  • if slave is not an instance of GearBase,

  • if efficiency is not a float or an int.

ValueError