modelPumpHeadControlled

Pump model with pump head control, an onOff-Switch and limitation of pump head.

Extends from AixLib.Fluid.Interfaces.PartialTwoPortInterface (Partial model with two ports and declaration of quantities that are used by many models).

Information

Overview

Simple model for a pump that sets pump speed (headUnbound) and can compute pump power and efficiency from polynomial functions. Pump speed (n) will be calculated from volume flow rate and pump head n=f(Q,H). Pump head (pressure difference in meter water column) is limited by pumpParam.maxMinHeight. This is used in 2Dtable maxMinTable. Those curves are normally derived from an electronic power limitation of a pump.

On-/Off Switch

The pump can be switched on/off by a boolean input (pumpBus.onOff_Input, TRUE = On). The switch between on and off is not filtered.

Controlling the pump (pumpBus.dp_Input)

The pump must be controlled by setting the pump head (pumpBus.dp_Input). dp_Input must be given in meter water column. This is an idealized pump that can maintain the given pump pressure difference at all times. The hydraulic network's pressure difference will then determine the resulting volume flow. The idealized calculation in this model maybe advantegous in terms of speed in comparison to the red pump that will compute pressure head from volume flow rate and pump speed via polynomial functions. To make the two pumps exchangeable also the controllers must be exchangeable.

Power and Efficiency calculation

The power and the efficiency of the pump can be calculated, with the help of polynomial aproximations. Only use them if you have correct / complete data about the pump. The efficiency calculation depends on pump power. Pump power depends on correct pump speed. Therefore, in this model, the pump speed (n) will be approximated from volume flow rate (v_dot_m3_h) and pump head (head) using the inverse of the ABC formula. Only for this simple case of a quadratic polynomial the equation H=f(Q,N) can be inverted to the form N=f(Q,H). If you use more coefficients in the polynomial (cHQN) the inversion makes no sense and the calculated pump speed will probably be wrong leading to a useless power usage assumption. Therefore, an assertion will check if parameter 'calculatePower' was set true but the corresponding coefficients in pumpParam.cHQN ([3,1], [2,2] and [1,3]) are all zero OR if there are more than those 3 coefficients defined in cHQN. 

See the examples under package "Examples".

Hints

Qnom, the nominal or design volume flow rate of the pump, is given in m³/h and should be selected by the engineer. A good default value would be 67 % of Qmax .The default value, however, is set to 0.5*max(pumpParam.maxMinSpeedCurves[:, 1]). max(pumpParam.maxMinSpeedCurves[:, 1]) is the maximum value found in column 1 of table maxMinSpeedCurves. This however, is more than the real maximum volume flow rate of the pump as the the table is extended by additional rows for proper extrapolation of table values. In order to compensate for this excess value Qnom is by default only at 50 % of the maxMinSpeedCurves value. Please refer to the referenceDataQHPN matrix to find the real Qmax value. A simple alternative for the given assumption could be to introduce a parameter Qmax in the pump record that contains the exact value.

Assumption and limitations

Note assumptions such as a specific definition ranges for the model, possible medium models, allowed combinations with other models etc. There might be limitations of the model such as reduced accuracy under specific circumstances. Please note all those limitations you know of so a potential user won't make too serious mistakes

Dynamics

Describe which states and dynamics are present in the model and which parameters may be used to influence them. This need not be added in partial classes.

Validation

Describe whether the validation was done using analytical validation, comparative model validation or empirical validation.

Parameters

TypeNameDefaultDescription
AixLib.DataBase.Pumps.PumpPolynomialBased.PumpBaseRecordpumpParamAixLib.DataBase.Pumps.PumpPolynomialBased.PumpBaseRecord()pump parameter record
Modelica.Units.SI.Densityrho_defaultMedium.density_pTX(p = Medium.p_default, T = Medium.T_default, X = Medium.X_default)Default medium density
Assumptions
BooleanallowFlowReversal (from PartialTwoPort)true= false to simplify equations, assuming, but not enforcing, no flow reversal
Modelica.Units.SI.VolumeV0Volume inside the pump
Nominal condition
Modelica.Units.SI.MassFlowRatem_flow_nominal (from PartialTwoPortInterface)Nominal mass flow rate
Advanced
Modelica.Units.SI.MassFlowRatem_flow_small (from PartialTwoPortInterface)1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow
Advanced › Diagnostics
Booleanshow_T (from PartialTwoPortInterface)false= true, if actual temperature at port is computed
Nominal design point › Design point of pump. Used for start value calculation.
RealQnom0.67*max(pumpParam.maxMinSpeedCurves[:, 1])Nominal volume flow rate in m³/h (~0.67*Qmax). Qmax is taken from pumpParam.maxMinSpeedCurves.
Modelica.Units.NonSI.AngularVelocity_rpmNnomModelica.Math.Vectors.interpolate(x = pumpParam.maxMinSpeedCurves[:, 1], y = pumpParam.maxMinSpeedCurves[:, 2], xi = Qnom)Pump speed in design point (Qnom,Hnom). Default is maximum speed at Qnom from pumpParam.maxMinSpeedCurves. Note that N is defined only on [nMin, nMax]. Due to power limitation N might be smaller than nMax for higher Q.
Modelica.Units.SI.HeightHnomAixLib.Fluid.Movers.PumpsPolynomialBased.BaseClasses.polynomial2D(pumpParam.cHQN, Qnom, Nnom)Nominal pump head in m (water). Will by default be calculated automatically from Qnom and Nnom. If you change the value make sure to also set a feasible Qnom.
Initialization › Pressure
Modelica.Units.SI.HeightHstartHnom Start value of pump head. Will be used to initialize criticalDamping.
Modelica.Media.Interfaces.Types.AbsolutePressurep_startMedium.p_defaultStart value of pressure
Initialization › Temperature
Modelica.Media.Interfaces.Types.TemperatureT_startMedium.T_defaultStart value of temperature
Dynamics › Equations
Modelica.Fluid.Types.DynamicsenergyDynamicsModelica.Fluid.Types.Dynamics.DynamicFreeInitialType of energy balance: dynamic (3 initialization options) or steady state
Modelica.Fluid.Types.DynamicsmassDynamicsenergyDynamicsType of mass balance: dynamic (3 initialization options) or steady state
General › Power and Efficiency
BooleancalculatePowertruecalc. power consumption?
BooleancalculateEfficiencyfalsecalc. efficency? (eta = f(H, Q, P))

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPort_aport_a (from PartialTwoPort)Fluid connector a (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_bport_b (from PartialTwoPort)Fluid connector b (positive design flow direction is from port_a to port_b)
Modelica.Blocks.Interfaces.RealOutputheadPump head
Modelica.Blocks.Interfaces.RealOutputpowerelectical power
Modelica.Blocks.Interfaces.RealOutputetaefficiency
BaseClasses.PumpBuspumpBus

Components

TypeNameDefaultDescription
Modelica.Units.SI.MassFlowRatem_flow (from PartialTwoPortInterface)port_a.m_flowMass flow rate from port_a to port_b (m_flow > 0 is design flow direction)
Modelica.Units.SI.PressureDifferencedp (from PartialTwoPortInterface)port_a.p - port_b.pPressure difference between port_a and port_b
Medium.ThermodynamicStatesta_a (from PartialTwoPortInterface)if allowFlowReversal then Medium.setState_phX(port_a.p, noEvent(actualStream(port_a.h_outflow)), noEvent(actualStream(port_a.Xi_outflow))) else Medium.setState_phX(port_a.p, noEvent(inStream(port_a.h_outflow)), noEvent(inStream(port_a.Xi_outflow)))Medium properties in port_a
Medium.ThermodynamicStatesta_b (from PartialTwoPortInterface)if allowFlowReversal then Medium.setState_phX(port_b.p, noEvent(actualStream(port_b.h_outflow)), noEvent(actualStream(port_b.Xi_outflow))) else Medium.setState_phX(port_b.p, noEvent(port_b.h_outflow), noEvent(port_b.Xi_outflow))Medium properties in port_b
Modelica.Units.SI.Pressuredp_pumpPressure increase
Modelica.Units.SI.AngularVelocitynpump speed calculated from volume flow and head n=f(Q,H)
Modelica.Blocks.Sources.RealExpressionVflow_m3hconversion of mass flow rate to volume flow rate
Modelica.Blocks.Tables.CombiTable1DvmaxMinTableOutputs static head (H). Maximum, minimum and freely selectable pump curve
Modelica.Blocks.Routing.DeMultiplex2deMultiplex3_1Seperate max/min pump head curve signal
BaseClasses.VariableLimitervariableLimiterLimit pump head to max/min curve
Modelica.Blocks.Logical.SwitchonOff
Modelica.Blocks.Sources.RealExpressionrealExpression
AixLib.Fluid.Movers.BaseClasses.IdealSourceidealSource
MixingVolumes.MixingVolumevol

Contents

NameDescription
efficiencyCharacteristic

Revisions

  • 2022-10-13 by Martin Kremer:
    Changed extrapolation in look-up table to 'hold last point'. Changed filter to first order.
  • 2019-09-18 by Alexander Kümpel:
    Renaming, restructuring and bug fixes.
  • 2018-03-01 by Peter Matthes:
    Improved parameter setup of pump model. Ordering in GUI, disabled some parameters that should be used not as input but rather as outputs (m_flow_start, p_a_start and p_b_start) and much more description in the parameter doc strings to help the user make better decisions.
  • 2018-02-01 by Peter Matthes:
    * When pump is turned off the model will also turn pump speed (n) off as well. Be aware that the pump speed will only be calculated when calculatePower==true.
    * n has been converted into a RealOutput instead of a normal Real.
    * The pump speed n is mapped onto the bus as "rpm_Act".
    * RealOutput v_dot_m3h has been changed into a formula block with the signal now being Vflow_m3h.y. This change improves model checking, as the former RealOutput had not defining connection but rather an attached equation. Dymola was not able to correctly reckognize this and threw a warning. This would have reduced the ability to debug the code as futher checks by Dymola would be avoided at that point.
    * Fixes calculation of power and efficiency. As power values near zero were possible, eta could get insanely high values. power and eta are now limited to more sensible values. However, there is no transition between the lowest possible value and zero any more. If that behaviour would be needed try implementing a transition function.
  • 2018-01-30 by Peter Matthes:
    * Renamed delivery head controlled pump model (blue) from Pump into PumpH as well as PumpPhysics into PumpPhysicsH. "H" stands for pump delivery head.
    * Moved efficiencyCharacteristic package directly into BaseClasses. This is due to moving the older pump model and depencencies into the Deprecated folder.
  • 2018-01-29 by Peter Matthes:
    * Removes parameter useABCcurves as that is the default to calculate speed and is only needed in the blue pump (PumpH) to calculate power from speed and volume flow. Currently there is no other way to compute speed other than inverting function H = f(Q,N) . This can only be done with the quadratic ABC formula. Therefore, an assert statement has been implemented instead to give a warning when you want to compute power but you use more that the ABC coefficients in cHQN.
    * Removes parameter Nnom and replaces it with Nstart. As discussed with Wilo Nnom is not very useful and it can be replaced with a start value. The default value has been lowered to a medium speed to avoid collision with the speed/power limitation. For most pumps the maximum speed is limited for increasing volume flows to avoid excess power consumption.
    * Increases Qnom from 0.5*Qmax to 0.67*Qmax as this would be a more realistic value.
  • 2018-01-26 by Peter Matthes:
    * Changes parameter name n_start into Nstart to be compatible/exchangeable with the speed controlled pump (red pump).
    * Removes unused code and remarks from the model.
    * Adds start parameters to the model and updates parameter equations (for Qnom for example).
    * Removes old headUnbound calculation via function of Q and N. Now sets bus.dp_Input directly.
  • 2017-12-01 by Peter Matthes:
    Changed pump due to removed parameters pumpParam.cABCeq and .cNQH.
  • 2017-11-22 by Peter Matthes:
    Prepares new pump model for external controller
    * Adds pumpBus connections for volume flow rate (vFRcur_m3h) and maximum/minimum pump head (maxMinHead).
    * Adds graphical annotations for v_dot_m3_h and headUnbound
    * Changes pump icon color to light blue to make a distinction to the other pumps.
    * Fixes documentation.
  • 2017-11-21 by Peter Matthes:
    Adds parameters n_start, Qnom and Hnom with defaults. Changes text in Icon view.
  • 2017-11-16 by Peter Matthes:
    Updated assertion for pumpParam.cABCeq and adds a second for pumpParam.cHQN and pumpParam.cNQH.
    * Removes all control strategies except n_set and fullFieldTable.
    * Removes pumpControlBlockDay component.
    * Adds instead (of pumpControlBlockDay.Head_calc).
    * Removes all unused parameters in pump model.
    * Adds new parameter useABCformulas.
    * Adds new equations for headUnbound and pump speed and power.
    * n_set becomes default control algorithm.
    * Changes start pressure of pump volume from p_b_start to p_a_start.
    (We normally know what the minimum pressure point before the pump
    should be.)
  • 2017-11-13 by Peter Matthes:
    Implemented. Non functional yet.