suboptimumg.vehicle.powertrain.powertrain#
- class suboptimumg.vehicle.powertrain.powertrain.Powertrain(vehicle_model)[source]#
Bases:
objectModels the full powertrain, composed of a motor.
- Parameters:
vehicle_model (VehicleModel)
- swap_motor(new_motor)[source]#
Replace the motor, adjusting total vehicle mass by the mass difference.
- Parameters:
new_motor (MotorModel) – Motor to install in place of the current one.
- Return type:
None
Notes
Total vehicle mass is an independent parameter covering the whole car, so swapping a component cannot re-derive it. Instead the difference between the outgoing and incoming motor masses is applied to it, leaving the rest of the car’s mass untouched.