This function computes the head in meter supplied by a pump at a given volume flow rate V_flow from a polynomial fitting of the pump curve.
The fitting is carried out from nominal inputs of the volume flow rate and the head (V_flow_nominal and head_nominal) via the least squares method. The order of the polynom that fits the curve is settable via the input OrderPolyFitting but cannot go over the third order.
function polynomialFlow import Modelica.Math.Vectors; extends Modelica.Fluid.Machines.BaseClasses.PumpCharacteristics.baseFlow; input Modelica.SIunits.VolumeFlowRate V_flow_nominal[:] "Volume flow rate for N operating points (single pump)" annotation( Dialog); input Modelica.SIunits.Position head_nominal[:] "Pump head for N operating points" annotation( Dialog); input Integer OrderPolyFitting(max = 3) = 3 "Order of the polynom that fits the fan curve"; end polynomialFlow;