@sh.add_function(dsp, inputs_kwargs=True, outputs=['gear_box_loss_model'])
@sh.add_function(dsp, outputs=['gear_box_loss_model'], weight=10)
def define_gear_box_loss_model(
gear_box_efficiency_parameters_cold_hot,
equivalent_gear_box_heat_capacity,
gear_box_temperature_references, initial_gear_box_temperature,
min_engine_on_speed, gear_box_ratios=None):
"""
Defines the gear box loss model.
:param gear_box_efficiency_parameters_cold_hot:
Parameters of gear box efficiency model for cold/hot phases:
- 'hot': `gbp00`, `gbp10`, `gbp01`
- 'cold': `gbp00`, `gbp10`, `gbp01`
:type gear_box_efficiency_parameters_cold_hot: dict
:param equivalent_gear_box_heat_capacity:
Equivalent gear box heat capacity [kg*J/K].
:type equivalent_gear_box_heat_capacity: float
:param gear_box_temperature_references:
Reference temperature [°C].
:type gear_box_temperature_references: (float, float)
:param initial_gear_box_temperature:
Initial gear box temperature [°C].
:type initial_gear_box_temperature: float
:param min_engine_on_speed:
Minimum engine speed to consider the engine to be on [RPM].
:type min_engine_on_speed: float
:param gear_box_ratios:
Gear box ratios [-].
:type gear_box_ratios: dict[int, float | int], optional
:return:
Gear box loss model.
:rtype: GearBoxLosses
.. note:: Torque entering the gearbox can be from engine side
(power mode or from wheels in motoring mode).
"""
model = GearBoxLosses(
gear_box_efficiency_parameters_cold_hot,
equivalent_gear_box_heat_capacity,
gear_box_temperature_references, initial_gear_box_temperature,
min_engine_on_speed, gear_box_ratios=gear_box_ratios
)
return model