This function generates a generic motor efficiency curve based on the rated motor power input and maximum motor efficiency according to U.S. DOE (2014) (shown below). It returns a constant array if the rated power is unavailable.
U.S. DOE (2014). Determining Electric Motor Load and Efficiency. URL: https://www.energy.gov/sites/prod/files/2014/04/f15/10097517.pdf
function motorEfficiencyCurve extends Modelica.Icons.Function; input Modelica.Units.SI.Power P_nominal "Rated input power of the motor"; input Modelica.Units.SI.Efficiency eta_max "Maximum motor efficiency"; output AixLib.Fluid.Movers.BaseClasses.Characteristics.efficiencyParameters_yMot motorEfficiency_yMot(y = {0, 0.1, 0.2, 0.3, 0.4, 0.6, 0.8, 1, 1.2}, eta = zeros(nPoi)) "Motor efficiency vs. motor part load ratio"; end motorEfficiencyCurve;