functionPerformanceCurve

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

  • x, r_N — time-varying inputs.
  • x_curve, y_curve, delta — parameters that fix the curve shape.
  • d — spline tangents at the support points. Defaults to splineDerivatives(x_curve, y_curve, isMonotonic(y_curve, false)); pass it explicitly (computed once as a final parameter in the calling model) so the symbolic engine does not re-evaluate it on every call.

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.

Inputs

TypeNameDefaultDescription
RealxValue of interest
Real[:]x_curveAbcissa
Real[size(x_curve, 1)]y_curveOrdinate
Real[size(x_curve, 1)]dTRANSFORM.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)
Realr_NRelative revolution, r_N=N/N_nominal
Realdelta0.05Small value for switching implementation around zero rpm

Outputs

TypeNameDefaultDescription
RealyOutput at x