A generator DC motor is a DC machine that can operate as both a generator (converting mechanical energy to DC electricity) and a motor (converting DC electricity to mechanical energy), using a commutator for unidirectional output and torque https://elmotalternators.com/