modelFlowMachineInterface
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Information
This is an interface that implements the functions to compute the head, power draw and efficiency of fans and pumps.
The nominal hydraulic characteristic (total pressure rise versus volume flow rate)
is given by a set of data points
using the data record per, which is an instance of
Buildings.Fluid.Movers.Data.Generic.
A cubic hermite spline with linear extrapolation is used to compute
the performance at other operating points.
The model computes the power and efficiency items in the list below.
-
Flow work:
Ẇflo = V̇ ⋅ Δp -
Total efficiency and consumed electric power:
η = Ẇflo ⁄ Pele -
Hydraulic effiency and hydraulic work (shaft work, brake horsepower):
ηhyd = Ẇflo ⁄ Ẇhyd -
Motor efficiency:
ηmot = Ẇhyd ⁄ Pele
See Buildings.Fluid.Movers.UsersGuide for how the user can provide power and efficiency information to the model.
Implementation
For numerical reasons, the user-provided data points for volume flow rate versus pressure rise are modified to add a fan internal flow resistance. Because this flow resistance is subtracted during the simulation when computing the fan pressure rise, the model reproduces the exact points that were provided by the user.
Also for numerical reasons, the pressure rise at zero flow rate and
the flow rate at zero pressure rise is added to the user-provided data,
unless the user already provides these data points.
Since Modelica 3.2 does not allow dynamic memory allocation, this
implementation required the use of three different arrays for the
situation where no additional point is added, where one additional
point is added and where two additional points are added.
The parameter curve causes the correct data record
to be used during the simulation.
In order to prevent the model from producing negative mover power when either the flow rate or pressure rise is forced to be negative, the flow work Ẇflo is constrained to be non-negative. The regularisation starts around 0.01% of the characteristic maximum power Ẇmax = V̇max Δpmax. See discussions and an example of this situation in IBPSA, #1621.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | homotopyInitialization | true | = true, use homotopy method |
| Buildings.Fluid.Movers.Data.Generic | per | Record with performance data | |
| Buildings.Fluid.Movers.BaseClasses.Types.PrescribedVariable | preVar | Buildings.Fluid.Movers.BaseClasses.Types.PrescribedVariable.Speed | Type of prescribed variable |
| Boolean | computePowerUsingSimilarityLaws | = true, compute power exactly, using similarity laws. Otherwise approximate. | |
| Modelica.Units.SI.VolumeFlowRate | V_flow_nominal | per.pressure.V_flow[nOri] | Nominal volume flow rate, used for homotopy |
| Modelica.Units.SI.Density | rho_default | Fluid density at medium default state | |
| Boolean | haveVMax | (abs(per.pressure.dp[nOri]) < Modelica.Constants.eps) | Flag, true if user specified data that contain V_flow_max |
| Modelica.Units.SI.VolumeFlowRate | V_flow_max | if per.V_flow_max > Modelica.Constants.eps then per.V_flow_max else V_flow_nominal | Maximum volume flow rate, used for smoothing |
| Integer | nOri | Number of data points for pressure curve |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput | y_in | Prescribed mover speed | |
| Modelica.Blocks.Interfaces.RealOutput | y_out | Mover speed (prescribed or computed) | |
| Modelica.Blocks.Interfaces.RealInput | m_flow | Mass flow rate | |
| Modelica.Blocks.Interfaces.RealInput | rho | Medium density | |
| Modelica.Blocks.Interfaces.RealOutput | V_flow | Volume flow rate | |
| Modelica.Blocks.Interfaces.RealInput | dp_in | Prescribed pressure increase | |
| Modelica.Blocks.Interfaces.RealOutput | dp | Pressure increase (computed or prescribed) | |
| Modelica.Blocks.Interfaces.RealOutput | WFlo | Flow work | |
| Modelica.Blocks.Interfaces.RealOutput | WHyd | Hydraulic work (shaft work, brake horsepower) | |
| Modelica.Blocks.Interfaces.RealOutput | PEle | Electrical power consumed | |
| Modelica.Blocks.Interfaces.RealOutput | eta | Overall efficiency | |
| Modelica.Blocks.Interfaces.RealOutput | etaHyd | Hydraulic efficiency | |
| Modelica.Blocks.Interfaces.RealOutput | etaMot | Motor efficiency | |
| Modelica.Blocks.Interfaces.RealOutput | r_N | Ratio N_actual/N_nominal |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Real | r_V | Ratio V_flow/V_flow_max |
Contents
| Name | Description |
|---|---|
| getPerformanceDataAsStringprotected | |
| getArrayAsStringprotected |
Revisions
-
February 7, 2025, by Jelger Jansen:
Removedimportstatement. This is for IBPSA, #1961. -
May 15, 2024, by Hongxiang Fu:
Corrected efficiency equations ifpowerOrEfficiencyIsHydraulic=falseand specified thestartattribute foretaHydandetaMotto suppress a warning. This is for IBPSA, #1880. -
August 8, 2022, by Hongxiang Fu:
-
Modified the power and efficiency computation to allow computing
the hydraulic efficiency
etaHydand the motor efficiencyetaMotseparately; -
Implemented the option to compute the total efficiency
etaor the hydraulic efficiencyetaHydusing the Euler number. -
Implemented the option for the user to provide the motor efficiency
etaMotas a function of part load ratio y. Also allowed generic curves to be used. -
Moved
haveVMaxhere from Buildings.Fluid.Movers.BaseClasses.PartialFlowMachine. -
Now it passes
WHydinstead ofetaHydto Buildings.Fluid.Movers.BaseClasses.PowerInterface. -
Now the flow work
WFlois bounded to be non-negative.
Added a constraint that Wflo = V̇ Δp ≥ 0.
This is for IBPSA, #1621. -
Modified the power and efficiency computation to allow computing
the hydraulic efficiency
-
April 14, 2020, by Michael Wetter:
ChangedhomotopyInitializationto a constant.
This is for IBPSA, #1341. -
December 2, 2016, by Michael Wetter:
Removedminattribute as otherwise numerical noise can cause the assertion on the limit to fail.
This is for #606. -
February 19, 2016, by Michael Wetter and Filip Jorissen:
Refactored model to make implementation clearer. This is for #417. -
January 22, 2016, by Michael Wetter:
Corrected type declaration of pressure difference and reformatted code. This is for #404. -
September 2, 2015, by Michael Wetter:
Corrected computation ofetaMot = Buildings.Fluid.Movers.BaseClasses.Characteristics.efficiency(per=per.motorEfficiency, V_flow=V_flow, d=motDer, r_N=r_N, delta=1E-4)which previously usedV_flow_maxinstead ofV_flow. -
January 6, 2015, by Michael Wetter:
Revised model for OpenModelica. -
November 22, 2014, by Michael Wetter:
Removed inN_actualandN_filteredthemaxattribute to avoid a translation warning. -
April 21, 2014, by Filip Jorissen and Michael Wetter:
Changed model to use Buildings.Fluid.Movers.Data.Generic. April 19, 2014, by Filip Jorissen:
Passed extra parameters to power() and efficiency() to be able to properly evaluate the scaling law. See #202 for a discussion and validation. -
September 27, 2013, by Michael Wetter:
Reformulatedper=if (curve == 1) then pCur1 elseif (curve == 2) then pCur2 else pCur3by moving the computation into the idividual logical branches because OpenModelica generates an error when assign the statement todataaspCur1,pCur2andpCur3have different dimensions. -
September 17, 2013, by Michael Wetter:
Added missingeachkeyword in declaration of parameters that are an array. -
March 20, 2013, by Michael Wetter:
Removed assignment in declaration ofpCur?.V_flowas these parameters have the attributefixed=falseset. -
October 11, 2012, by Michael Wetter:
Added implementation ofWFlo = eta * Pwith guard against division by zero. Changed implementation ofetaMot=sqrt(eta)toetaHyd = 1to avoid infinite derivative asetaconverges to zero. -
February 20, 2012, by Michael Wetter:
Assigned value to nominal attribute ofV_flow. -
February 14, 2012, by Michael Wetter:
Added filter for start-up and shut-down transient. -
October 4 2011, by Michael Wetter:
Revised the implementation of the pressure drop computation as a function of speed and volume flow rate. The new implementation avoids a singularity near zero volume flow rate and zero speed. -
March 28 2011, by Michael Wetter:
Addedhomotopyoperator. -
March 23 2010, by Michael Wetter:
First implementation.