Pump-characteristic copy of TRANSFORM.Math.PerformanceCurve. See that function for the math, argument meaning and the analytic-derivative pattern.
Both copies must be kept in sync. This local copy exists so that
the PumpCharacteristics closure-relation models can
reference a function within their own sub-package; the
implementation, default for d, and derivative
annotation are identical.
function PerformanceCurve input Real x "Value of interest"; input Real x_curve[:]; input Real y_curve[size(x_curve, 1)]; input Real d[size(x_curve, 1)] = TRANSFORM.Math.splineDerivatives(x = x_curve, y = y_curve, ensureMonotonicity = TRANSFORM.Math.isMonotonic(x = y_curve, strict = false)) "Derivatives at the support points (precomputed; default keeps backward compatibility)"; input Real r_N(unit = "1") "Relative revolution, r_N=N/N_nominal"; input Real delta = 0.05 "Small value for switching implementation around zero rpm"; output Real y "Output at x"; end PerformanceCurve;