add generator torque, generator code by ardavan

unproven