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 tosplineDerivatives(x_curve, y_curve, isMonotonic(y_curve, false)); pass it explicitly (computed once as afinal parameterin 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
| Type | Name | Default | Description |
|---|---|---|---|
| Real | x | Value of interest | |
| Real[:] | x_curve | Abcissa | |
| Real[size(x_curve, 1)] | y_curve | Ordinate | |
| Real[size(x_curve, 1)] | d | 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) |
| Real | r_N | Relative revolution, r_N=N/N_nominal | |
| Real | delta | 0.05 | Small value for switching implementation around zero rpm |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| Real | y | Output at x |