.TRANSFORM.Math.PerformanceCurve

Information

Evaluates a pump performance curve y = f(x, r_N) using monotone cubic Hermite interpolation between the support points (x_curve[i], y_curve[i]), with linear extrapolation outside the data range and a smooth blending of the relative speed r_N = N/N_nominal near zero.

The function is used by the pump head, flow, and power characteristic models to apply pump affinity-law scaling: the abscissa is normalised by the relative-speed factor (ratio = x/r_R) before the curve lookup, where r_R is r_N itself for r_N > delta and a cubic Hermite blend down to 0.5*delta for r_N ≤ delta (clamped to 0.5*delta for negative r_N). This avoids division-by-zero singularities when the pump is stopped or near stopped.

Arguments

Differentiation

smoothOrder = 1 declares the result is C¹ in x and r_N. The derivative annotation provides PerformanceCurve_der as the analytic time derivative, with x_curve, y_curve, d and delta declared zeroDerivative. This lets Dymola build analytic Jacobians for systems containing pump curves — previously the chain rule descended into splineDerivatives and failed.

Interface

function PerformanceCurve
  input Real x "Value of interest";
  input Real x_curve[:] "Abcissa";
  input Real y_curve[size(x_curve, 1)] "Ordinate";
  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;

Generated at 2026-07-05T18:59:05Z by OpenModelicaOpenModelica 1.27.0 using GenerateDoc.mos