From fc1a554634ca06b906e358a214709181734002b2 Mon Sep 17 00:00:00 2001 From: Michael Wetter Date: Fri, 9 Jan 2015 09:18:40 -0800 Subject: [PATCH 01/18] Added files from Buildings library For #147 --- .../Movers/BaseClasses/Characteristics.mo | 220 ++++++---- .../BaseClasses/ControlledFlowMachine.mo | 35 +- ...lowMachine.mo => FlowControlledMachine.mo} | 15 +- .../BaseClasses/FlowMachineInterface.mo | 413 ++++++++++-------- .../Movers/BaseClasses/PartialFlowMachine.mo | 2 +- .../Movers/BaseClasses/PowerInterface.mo | 68 +-- .../Fluid/Movers/BaseClasses/package.order | 6 +- Annex60/Fluid/Movers/Data/FlowControlled.mo | 84 ++++ .../Pumps/CronolineIL80slash220dash4slash4.mo | 28 ++ .../Movers/Data/Pumps/Stratos25slash1to4.mo | 45 ++ .../Movers/Data/Pumps/Stratos25slash1to6.mo | 58 +++ .../Movers/Data/Pumps/Stratos25slash1to8.mo | 42 ++ .../Movers/Data/Pumps/Stratos30slash1to4.mo | 44 ++ .../Movers/Data/Pumps/Stratos30slash1to8.mo | 42 ++ .../Movers/Data/Pumps/Stratos32slash1to12.mo | 44 ++ .../Movers/Data/Pumps/Stratos40slash1to12.mo | 42 ++ .../Movers/Data/Pumps/Stratos40slash1to8.mo | 42 ++ .../Movers/Data/Pumps/Stratos50slash1to12.mo | 44 ++ .../Movers/Data/Pumps/Stratos80slash1to12.mo | 44 ++ .../VeroLine80slash115dash2comma2slash2.mo | 29 ++ Annex60/Fluid/Movers/Data/Pumps/package.mo | 16 + Annex60/Fluid/Movers/Data/Pumps/package.order | 12 + .../Fluid/Movers/Data/SpeedControlled_Nrpm.mo | 58 +++ .../Fluid/Movers/Data/SpeedControlled_y.mo | 93 ++++ Annex60/Fluid/Movers/Data/package.mo | 15 + Annex60/Fluid/Movers/Data/package.order | 4 + .../BaseClasses/FlowMachine_ZeroFlow.mo | 33 +- .../Movers/Examples/BaseClasses/package.mo | 1 + .../Movers/Examples/BaseClasses/package.order | 1 - ...hineFeedbackControl.mo => ClosedLoop_y.mo} | 16 +- ...wMachineParallel_y.mo => PumpsParallel.mo} | 18 +- ...{FlowMachineSeries_y.mo => PumpsSeries.mo} | 18 +- ...ves.mo => SpeedControlled_y_pumpCurves.mo} | 15 +- Annex60/Fluid/Movers/Examples/package.order | 15 +- ...FlowMachine_dp.mo => FlowControlled_dp.mo} | 11 +- ...ine_m_flow.mo => FlowControlled_m_flow.mo} | 32 +- ...achine_Nrpm.mo => SpeedControlled_Nrpm.mo} | 54 ++- ...{FlowMachine_y.mo => SpeedControlled_y.mo} | 61 +-- Annex60/Fluid/Movers/UsersGuide.mo | 193 +++++--- .../BaseClasses/ControlledFlowMachine.mo | 18 +- .../Movers/Validation/BaseClasses/package.mo | 12 + .../Validation/BaseClasses/package.order | 1 + .../ControlledFlowMachine.mo | 6 +- .../ControlledFlowMachineDynamic.mo | 6 +- .../FlowControlled_dp.mo} | 12 +- .../FlowControlled_m_flow.mo} | 12 +- Annex60/Fluid/Movers/Validation/Power.mo | 191 ++++++++ .../Validation/PumpCurveConstruction.mo | 220 ++++++++++ .../Movers/Validation/Pump_Nrpm_stratos.mo | 319 ++++++++++++++ .../Fluid/Movers/Validation/Pump_stratos.mo | 46 ++ .../SpeedControlled_Nrpm.mo} | 24 +- .../SpeedControlled_y.mo} | 20 +- .../SpeedControlled_y_linear.mo} | 18 +- Annex60/Fluid/Movers/Validation/package.mo | 21 + Annex60/Fluid/Movers/Validation/package.order | 12 + Annex60/Fluid/Movers/package.mo | 1 + Annex60/Fluid/Movers/package.order | 10 +- .../Images/Fluid/Movers/Data/stratoscurve.png | Bin 0 -> 81102 bytes .../Movers/Examples/PumpValidationHead.png | Bin 0 -> 70193 bytes .../Movers/Examples/PumpValidationPower.png | Bin 0 -> 26127 bytes ...x60_Fluid_Movers_Examples_ClosedLoop_y.txt | 5 + ..._Movers_Examples_ControlledFlowMachine.txt | 10 - ..._Examples_ControlledFlowMachineDynamic.txt | 10 - ...rs_Examples_FlowMachineFeedbackControl.txt | 5 - ...Fluid_Movers_Examples_FlowMachine_Nrpm.txt | 7 - ...uid_Movers_Examples_FlowMachine_m_flow.txt | 7 - ...60_Fluid_Movers_Examples_FlowMachine_y.txt | 7 - ...0_Fluid_Movers_Examples_PumpsParallel.txt} | 0 ...x60_Fluid_Movers_Examples_PumpsSeries.txt} | 4 +- ...Examples_SpeedControlled_y_pumpCurves.txt} | 6 +- ...overs_Validation_ControlledFlowMachine.txt | 10 + ...alidation_ControlledFlowMachineDynamic.txt | 10 + ...d_Movers_Validation_FlowControlled_dp.txt} | 6 +- ...overs_Validation_FlowControlled_m_flow.txt | 7 + .../Annex60_Fluid_Movers_Validation_Power.txt | 7 + ...overs_Validation_PumpCurveConstruction.txt | 6 + ...id_Movers_Validation_Pump_Nrpm_stratos.txt | 17 + ...0_Fluid_Movers_Validation_Pump_stratos.txt | 7 + ...Movers_Validation_SpeedControlled_Nrpm.txt | 7 + ...id_Movers_Validation_SpeedControlled_y.txt | 7 + ...s_Validation_SpeedControlled_y_linear.txt} | 4 +- ...neFeedbackControl.mos => ClosedLoop_y.mos} | 4 +- ...wMachineSeries_y.mos => PumpsParallel.mos} | 4 +- ...wMachineParallel_y.mos => PumpsSeries.mos} | 4 +- ...s.mos => SpeedControlled_y_pumpCurves.mos} | 4 +- .../ControlledFlowMachine.mos | 2 +- .../ControlledFlowMachineDynamic.mos | 2 +- .../FlowControlled_dp.mos} | 8 +- .../Validation/FlowControlled_m_flow.mos | 40 ++ .../Dymola/Fluid/Movers/Validation/Power.mos | 8 + .../Validation/PumpCurveConstruction.mos | 9 + .../Movers/Validation/Pump_Nrpm_stratos.mos | 29 ++ .../Pump_stratos.mos} | 8 +- .../SpeedControlled_Nrpm.mos} | 8 +- .../SpeedControlled_y.mos} | 8 +- .../SpeedControlled_y_linear.mos} | 4 +- 96 files changed, 2613 insertions(+), 640 deletions(-) rename Annex60/Fluid/Movers/BaseClasses/{PrescribedFlowMachine.mo => FlowControlledMachine.mo} (90%) create mode 100644 Annex60/Fluid/Movers/Data/FlowControlled.mo create mode 100644 Annex60/Fluid/Movers/Data/Pumps/CronolineIL80slash220dash4slash4.mo create mode 100644 Annex60/Fluid/Movers/Data/Pumps/Stratos25slash1to4.mo create mode 100644 Annex60/Fluid/Movers/Data/Pumps/Stratos25slash1to6.mo create mode 100644 Annex60/Fluid/Movers/Data/Pumps/Stratos25slash1to8.mo create mode 100644 Annex60/Fluid/Movers/Data/Pumps/Stratos30slash1to4.mo create mode 100644 Annex60/Fluid/Movers/Data/Pumps/Stratos30slash1to8.mo create mode 100644 Annex60/Fluid/Movers/Data/Pumps/Stratos32slash1to12.mo create mode 100644 Annex60/Fluid/Movers/Data/Pumps/Stratos40slash1to12.mo create mode 100644 Annex60/Fluid/Movers/Data/Pumps/Stratos40slash1to8.mo create mode 100644 Annex60/Fluid/Movers/Data/Pumps/Stratos50slash1to12.mo create mode 100644 Annex60/Fluid/Movers/Data/Pumps/Stratos80slash1to12.mo create mode 100644 Annex60/Fluid/Movers/Data/Pumps/VeroLine80slash115dash2comma2slash2.mo create mode 100644 Annex60/Fluid/Movers/Data/Pumps/package.mo create mode 100644 Annex60/Fluid/Movers/Data/Pumps/package.order create mode 100644 Annex60/Fluid/Movers/Data/SpeedControlled_Nrpm.mo create mode 100644 Annex60/Fluid/Movers/Data/SpeedControlled_y.mo create mode 100644 Annex60/Fluid/Movers/Data/package.mo create mode 100644 Annex60/Fluid/Movers/Data/package.order rename Annex60/Fluid/Movers/Examples/{FlowMachineFeedbackControl.mo => ClosedLoop_y.mo} (91%) rename Annex60/Fluid/Movers/Examples/{FlowMachineParallel_y.mo => PumpsParallel.mo} (91%) rename Annex60/Fluid/Movers/Examples/{FlowMachineSeries_y.mo => PumpsSeries.mo} (88%) rename Annex60/Fluid/Movers/Examples/{FlowMachine_y_pumpCurves.mo => SpeedControlled_y_pumpCurves.mo} (94%) mode change 100755 => 100644 Annex60/Fluid/Movers/Examples/package.order rename Annex60/Fluid/Movers/{FlowMachine_dp.mo => FlowControlled_dp.mo} (97%) rename Annex60/Fluid/Movers/{FlowMachine_m_flow.mo => FlowControlled_m_flow.mo} (95%) rename Annex60/Fluid/Movers/{FlowMachine_Nrpm.mo => SpeedControlled_Nrpm.mo} (57%) rename Annex60/Fluid/Movers/{FlowMachine_y.mo => SpeedControlled_y.mo} (62%) rename Annex60/Fluid/Movers/{Examples => Validation}/BaseClasses/ControlledFlowMachine.mo (94%) create mode 100644 Annex60/Fluid/Movers/Validation/BaseClasses/package.mo create mode 100644 Annex60/Fluid/Movers/Validation/BaseClasses/package.order rename Annex60/Fluid/Movers/{Examples => Validation}/ControlledFlowMachine.mo (85%) rename Annex60/Fluid/Movers/{Examples => Validation}/ControlledFlowMachineDynamic.mo (84%) rename Annex60/Fluid/Movers/{Examples/FlowMachine_dp.mo => Validation/FlowControlled_dp.mo} (83%) rename Annex60/Fluid/Movers/{Examples/FlowMachine_m_flow.mo => Validation/FlowControlled_m_flow.mo} (84%) create mode 100644 Annex60/Fluid/Movers/Validation/Power.mo create mode 100644 Annex60/Fluid/Movers/Validation/PumpCurveConstruction.mo create mode 100644 Annex60/Fluid/Movers/Validation/Pump_Nrpm_stratos.mo create mode 100644 Annex60/Fluid/Movers/Validation/Pump_stratos.mo rename Annex60/Fluid/Movers/{Examples/FlowMachine_Nrpm.mo => Validation/SpeedControlled_Nrpm.mo} (67%) rename Annex60/Fluid/Movers/{Examples/FlowMachine_y.mo => Validation/SpeedControlled_y.mo} (74%) rename Annex60/Fluid/Movers/{Examples/FlowMachine_y_linear.mo => Validation/SpeedControlled_y_linear.mo} (89%) create mode 100644 Annex60/Fluid/Movers/Validation/package.mo create mode 100644 Annex60/Fluid/Movers/Validation/package.order create mode 100644 Annex60/Resources/Images/Fluid/Movers/Data/stratoscurve.png create mode 100644 Annex60/Resources/Images/Fluid/Movers/Examples/PumpValidationHead.png create mode 100644 Annex60/Resources/Images/Fluid/Movers/Examples/PumpValidationPower.png create mode 100644 Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_Movers_Examples_ClosedLoop_y.txt delete mode 100644 Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_Movers_Examples_ControlledFlowMachine.txt delete mode 100644 Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_Movers_Examples_ControlledFlowMachineDynamic.txt delete mode 100644 Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_Movers_Examples_FlowMachineFeedbackControl.txt delete mode 100644 Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_Movers_Examples_FlowMachine_Nrpm.txt delete mode 100644 Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_Movers_Examples_FlowMachine_m_flow.txt delete mode 100644 Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_Movers_Examples_FlowMachine_y.txt rename Annex60/Resources/ReferenceResults/Dymola/{Annex60_Fluid_Movers_Examples_FlowMachineParallel_y.txt => Annex60_Fluid_Movers_Examples_PumpsParallel.txt} (100%) rename Annex60/Resources/ReferenceResults/Dymola/{Annex60_Fluid_Movers_Examples_FlowMachineSeries_y.txt => Annex60_Fluid_Movers_Examples_PumpsSeries.txt} (83%) rename Annex60/Resources/ReferenceResults/Dymola/{Annex60_Fluid_Movers_Examples_FlowMachine_y_pumpCurves.txt => Annex60_Fluid_Movers_Examples_SpeedControlled_y_pumpCurves.txt} (79%) create mode 100644 Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_Movers_Validation_ControlledFlowMachine.txt create mode 100644 Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_Movers_Validation_ControlledFlowMachineDynamic.txt rename Annex60/Resources/ReferenceResults/Dymola/{Annex60_Fluid_Movers_Examples_FlowMachine_dp.txt => Annex60_Fluid_Movers_Validation_FlowControlled_dp.txt} (68%) create mode 100644 Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_Movers_Validation_FlowControlled_m_flow.txt create mode 100644 Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_Movers_Validation_Power.txt create mode 100644 Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_Movers_Validation_PumpCurveConstruction.txt create mode 100644 Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_Movers_Validation_Pump_Nrpm_stratos.txt create mode 100644 Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_Movers_Validation_Pump_stratos.txt create mode 100644 Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_Movers_Validation_SpeedControlled_Nrpm.txt create mode 100644 Annex60/Resources/ReferenceResults/Dymola/Annex60_Fluid_Movers_Validation_SpeedControlled_y.txt rename Annex60/Resources/ReferenceResults/Dymola/{Annex60_Fluid_Movers_Examples_FlowMachine_y_linear.txt => Annex60_Fluid_Movers_Validation_SpeedControlled_y_linear.txt} (68%) rename Annex60/Resources/Scripts/Dymola/Fluid/Movers/Examples/{FlowMachineFeedbackControl.mos => ClosedLoop_y.mos} (62%) rename Annex60/Resources/Scripts/Dymola/Fluid/Movers/Examples/{FlowMachineSeries_y.mos => PumpsParallel.mos} (82%) rename Annex60/Resources/Scripts/Dymola/Fluid/Movers/Examples/{FlowMachineParallel_y.mos => PumpsSeries.mos} (81%) rename Annex60/Resources/Scripts/Dymola/Fluid/Movers/Examples/{FlowMachine_y_pumpCurves.mos => SpeedControlled_y_pumpCurves.mos} (83%) rename Annex60/Resources/Scripts/Dymola/Fluid/Movers/{Examples => Validation}/ControlledFlowMachine.mos (78%) rename Annex60/Resources/Scripts/Dymola/Fluid/Movers/{Examples => Validation}/ControlledFlowMachineDynamic.mos (76%) rename Annex60/Resources/Scripts/Dymola/Fluid/Movers/{Examples/FlowMachine_dp.mos => Validation/FlowControlled_dp.mos} (77%) create mode 100644 Annex60/Resources/Scripts/Dymola/Fluid/Movers/Validation/FlowControlled_m_flow.mos create mode 100644 Annex60/Resources/Scripts/Dymola/Fluid/Movers/Validation/Power.mos create mode 100644 Annex60/Resources/Scripts/Dymola/Fluid/Movers/Validation/PumpCurveConstruction.mos create mode 100644 Annex60/Resources/Scripts/Dymola/Fluid/Movers/Validation/Pump_Nrpm_stratos.mos rename Annex60/Resources/Scripts/Dymola/Fluid/Movers/{Examples/FlowMachine_y.mos => Validation/Pump_stratos.mos} (79%) rename Annex60/Resources/Scripts/Dymola/Fluid/Movers/{Examples/FlowMachine_m_flow.mos => Validation/SpeedControlled_Nrpm.mos} (76%) rename Annex60/Resources/Scripts/Dymola/Fluid/Movers/{Examples/FlowMachine_Nrpm.mos => Validation/SpeedControlled_y.mos} (77%) rename Annex60/Resources/Scripts/Dymola/Fluid/Movers/{Examples/FlowMachine_y_linear.mos => Validation/SpeedControlled_y_linear.mos} (70%) diff --git a/Annex60/Fluid/Movers/BaseClasses/Characteristics.mo b/Annex60/Fluid/Movers/BaseClasses/Characteristics.mo index 8f6249024b..6b6319d006 100644 --- a/Annex60/Fluid/Movers/BaseClasses/Characteristics.mo +++ b/Annex60/Fluid/Movers/BaseClasses/Characteristics.mo @@ -3,11 +3,18 @@ package Characteristics "Functions for fan or pump characteristics" record flowParameters "Record for flow parameters" extends Modelica.Icons.Record; + parameter Modelica.SIunits.VolumeFlowRate V_flow[:](each min=0) "Volume flow rate at user-selected operating points"; - parameter Modelica.SIunits.Pressure dp[size(V_flow,1)]( + parameter Modelica.SIunits.Pressure dp[:]( each min=0, each displayUnit="Pa") "Fan or pump total pressure at these flow rates"; + + // This is needed for OpenModelica. + // fixme: Check if this can be put into FlowMachineInterface instead of here. + final parameter Integer n = size(V_flow,1) + "Number of data points for flow rate in V_flow vs. pressure data"; + annotation (Documentation(info="

Data record for performance data that describe volume flow rate versus @@ -31,7 +38,8 @@ First implementation. record flowParametersInternal "Record for flow parameters with prescribed size" extends Modelica.Icons.Record; - parameter Integer n "Number of elements in each array"; + parameter Integer n "Number of elements in each array" + annotation(Evaluate=true); parameter Modelica.SIunits.VolumeFlowRate V_flow[n](each min=0) "Volume flow rate at user-selected operating points"; parameter Modelica.SIunits.Pressure dp[n]( @@ -69,11 +77,12 @@ First implementation. record efficiencyParameters "Record for efficiency parameters" extends Modelica.Icons.Record; - parameter Real r_V[:](each min=0, each max=1, each displayUnit="1") - "Volumetric flow rate divided by nominal flow rate at user-selected operating points"; - parameter Real eta[size(r_V,1)]( - each min=0, each max=1, each displayUnit="1") - "Fan or pump efficiency at these flow rates"; + parameter Modelica.SIunits.VolumeFlowRate V_flow[:]( + each min=0) "Volumetric flow rate at user-selected operating points"; + parameter Real eta[size(V_flow,1)]( + each min=0, + each max=1, + each displayUnit="1") "Fan or pump efficiency at these flow rates"; annotation (Documentation(info="

Data record for performance data that describe volume flow rate versus @@ -96,10 +105,10 @@ First implementation. record powerParameters "Record for electrical power parameters" extends Modelica.Icons.Record; - parameter Modelica.SIunits.VolumeFlowRate V_flow[:](each min=0)= {0} + parameter Modelica.SIunits.VolumeFlowRate V_flow[:](each min=0) "Volume flow rate at user-selected operating points"; - parameter Modelica.SIunits.Power P[size(V_flow,1)]( - each min=0) = {0} "Fan or pump electrical power at these flow rates"; + parameter Modelica.SIunits.Power P[size(V_flow,1)](each min=0) + "Fan or pump electrical power at these flow rates"; annotation (Documentation(info="

Data record for performance data that describe volume flow rate versus @@ -129,7 +138,8 @@ First implementation. "Flow vs. head characteristics for fan or pump pressure raise" extends Modelica.Icons.Function; input - Annex60.Fluid.Movers.BaseClasses.Characteristics.flowParametersInternal data + Annex60.Fluid.Movers.BaseClasses.Characteristics.flowParametersInternal + per "Pressure performance data"; input Modelica.SIunits.VolumeFlowRate V_flow "Volumetric flow rate"; input Real r_N(unit="1") "Relative revolution, r_N=N/N_nominal"; @@ -150,7 +160,7 @@ First implementation. output Modelica.SIunits.Pressure dp "Pressure raise"; protected - Integer dimD(min=2)=size(data.V_flow, 1) "Dimension of data vector"; + Integer dimD(min=2)=size(per.V_flow, 1) "Dimension of data vector"; function performanceCurve "Performance curve away from the origin" input Modelica.SIunits.VolumeFlowRate V_flow "Volumetric flow rate"; @@ -159,7 +169,7 @@ First implementation. "Coefficients for polynomial of pressure vs. flow rate"; input Annex60.Fluid.Movers.BaseClasses.Characteristics.flowParametersInternal - data + per "Pressure performance data"; input Integer dimD "Dimension of data vector"; @@ -175,17 +185,17 @@ First implementation. // rat_nominal = V_flow_nominal/r_N_nominal = V_flow_nominal/1, we use // V_flow_nominal below for j in 1:dimD-1 loop - if rat > data.V_flow[j] then + if rat > per.V_flow[j] then i := j; end if; end for; // Extrapolate or interpolate the data dp:=r_N^2*Annex60.Utilities.Math.Functions.cubicHermiteLinearExtrapolation( x=rat, - x1=data.V_flow[i], - x2=data.V_flow[i + 1], - y1=data.dp[i], - y2=data.dp[i + 1], + x1=per.V_flow[i], + x2=per.V_flow[i + 1], + y1=per.dp[i], + y2=per.dp[i + 1], y1d=d[i], y2d=d[i+1]); annotation(smoothOrder=1); @@ -194,7 +204,7 @@ First implementation. algorithm if r_N >= delta then dp := performanceCurve(V_flow=V_flow, r_N=r_N, d=d, - data=data, dimD=dimD); + per=per, dimD=dimD); elseif r_N <= delta/2 then dp := flowApproximationAtOrigin(r_N=r_N, V_flow=V_flow, VDelta_flow= VDelta_flow, dpDelta=dpDelta, @@ -202,12 +212,14 @@ First implementation. else dp := Modelica.Fluid.Utilities.regStep(x=r_N-0.75*delta, y1=performanceCurve(V_flow=V_flow, r_N=r_N, d=d, - data=data, dimD=dimD), + per=per, dimD=dimD), y2=flowApproximationAtOrigin(r_N=r_N, V_flow=V_flow, VDelta_flow=VDelta_flow, dpDelta=dpDelta, delta=delta, cBar=cBar), x_small=delta/4); end if; + // linear equation for being able to handle r_N=0, see + // Annex60/Resources/Images/Fluid/Movers/UsersGuide/2013-IBPSA-Wetter.pdf dp := dp - V_flow*kRes; annotation(smoothOrder=1, Documentation(info=" @@ -216,23 +228,26 @@ This function computes the fan static pressure raise as a function of volume flow rate and revolution in the form

- Δp = rN2   s(V/rN, d) + Δp = rN2   s(V̇/rN, d) - Δpr ,

where Δp is the pressure rise, rN is the normalized fan speed, -V is the volume flow rate and + is the volume flow rate and d are performance data for fan or pump power consumption at rN=1. The term

-Δpr = V   Δpmax ⁄ Vmax   δ +Δpr = V̇   Δpmax ⁄ V̇max   δ

+where δ > 0 is a pressure that is small compared to pressure raise of the +fan at the nominal conditions, models the flow resistance of the fan, approximated using a linear equation. -This is done for numerical reasons to avoid a singularity at rN=0. Since δ is small, the contribution of this term is small. +This is done for numerical reasons to avoid a singularity at rN=0. +Since δ is small, the contribution of this term is small. The fan and pump models in Annex60.Fluid.Movers modify the user-supplied performance data to add the term @@ -251,13 +266,18 @@ a singularity at the origin. The composite model is once continuously differenti in all input variables.

", revisions=" + -")); +"), smoothOrder=1); end pressure; function flowApproximationAtOrigin @@ -272,6 +292,12 @@ First implementation. "Coefficients for linear approximation of pressure vs. flow rate"; output Modelica.SIunits.Pressure dp "Pressure raise"; algorithm + + // see equation 20 in Annex60/Resources/Images/Fluid/Movers/UsersGuide/2013-IBPSA-Wetter.pdf + // this equation satisfies the constraints detailed in the paper + // the first term is added for having a faster convergence + // the last term in the paper is absent here because it can be found in + // Annex60.Fluid.Movers.BaseClasses.Characteristics.pressure dp := r_N * dpDelta + r_N^2 * (cBar[1] + cBar[2]*V_flow); annotation (Documentation(info="

@@ -292,39 +318,44 @@ First implementation. function power "Flow vs. electrical power characteristics for fan or pump" extends Modelica.Icons.Function; - input Annex60.Fluid.Movers.BaseClasses.Characteristics.powerParameters data + input Annex60.Fluid.Movers.BaseClasses.Characteristics.powerParameters per "Pressure performance data"; input Modelica.SIunits.VolumeFlowRate V_flow "Volumetric flow rate"; input Real r_N(unit="1") "Relative revolution, r_N=N/N_nominal"; input Real d[:] "Derivatives at support points for spline interpolation"; + input Real delta "Small value for switching implementation around zero rpm"; output Modelica.SIunits.Power P "Power consumption"; protected - Integer n=size(data.V_flow, 1) "Dimension of data vector"; + Integer n=size(per.V_flow, 1) "Dimension of data vector"; Modelica.SIunits.VolumeFlowRate rat "Ratio of V_flow/r_N"; Integer i "Integer to select data interval"; algorithm if n == 1 then - P := r_N^3*data.P[1]; + P := r_N^3*per.P[1]; else i :=1; - // Since the coefficients for the spline were evaluated for - // rat_nominal = V_flow_nominal/r_N_nominal = V_flow_nominal/1, we use - // V_flow_nominal below + // The use of the max function to avoids problems for low speeds + // and turned off pumps + rat:=V_flow/ + Annex60.Utilities.Math.Functions.smoothMax( + x1=r_N, + x2=0.1, + deltaX=delta); for j in 1:n-1 loop - if V_flow > data.V_flow[j] then + if rat > per.V_flow[j] then i := j; end if; end for; // Extrapolate or interpolate the data P:=r_N^3*Annex60.Utilities.Math.Functions.cubicHermiteLinearExtrapolation( - x=V_flow, - x1=data.V_flow[i], - x2=data.V_flow[i + 1], - y1=data.P[i], - y2=data.P[i + 1], + x=rat, + x1=per.V_flow[i], + x2=per.V_flow[i + 1], + y1=per.P[i], + y2=per.P[i + 1], y1d=d[i], y2d=d[i+1]); end if; @@ -335,13 +366,13 @@ This function computes the fan power consumption for given volume flow rate, speed and performance data. The power consumption is

- P = rN3   s(V, d), + P = rN3   s(V̇/rN, d),

where P is the power consumption, rN is the normalized fan speed, -V is the volume flow rate and + is the volume flow rate and d are performance data for fan or pump power consumption at rN=1.

Implementation

@@ -353,42 +384,60 @@ If the data d define a monotone decreasing sequence, then ", revisions=" -")); +"), smoothOrder=1); end power; function efficiency "Flow vs. efficiency characteristics for fan or pump" extends Modelica.Icons.Function; - input Annex60.Fluid.Movers.BaseClasses.Characteristics.efficiencyParameters - data "Efficiency performance data"; - input Real r_V(unit="1") - "Volumetric flow rate divided by nominal flow rate"; + input + Annex60.Fluid.Movers.BaseClasses.Characteristics.efficiencyParameters + per "Efficiency performance data"; + input Modelica.SIunits.VolumeFlowRate V_flow "Volumetric flow rate"; input Real d[:] "Derivatives at support points for spline interpolation"; + input Real r_N(unit="1") "Relative revolution, r_N=N/N_nominal"; + input Real delta "Small value for switching implementation around zero rpm"; output Real eta(min=0, unit="1") "Efficiency"; protected - Integer n = size(data.r_V, 1) "Number of data points"; + Integer n = size(per.V_flow, 1) "Number of data points"; + Real rat "Ratio of V_flow/r_N"; Integer i "Integer to select data interval"; algorithm if n == 1 then - eta := data.eta[1]; + eta := per.eta[1]; else + // The use of the max function to avoids problems for low speeds + // and turned off pumps + rat:=V_flow/ + Annex60.Utilities.Math.Functions.smoothMax( + x1=r_N, + x2=0.1, + deltaX=delta); i :=1; for j in 1:n-1 loop - if r_V > data.r_V[j] then + if rat > per.V_flow[j] then i := j; end if; end for; // Extrapolate or interpolate the data eta:=Annex60.Utilities.Math.Functions.cubicHermiteLinearExtrapolation( - x=r_V, - x1=data.r_V[i], - x2=data.r_V[i + 1], - y1=data.eta[i], - y2=data.eta[i + 1], + x=rat, + x1=per.V_flow[i], + x2=per.V_flow[i + 1], + y1=per.eta[i], + y2=per.eta[i + 1], y1d=d[i], y2d=d[i+1]); end if; @@ -400,12 +449,13 @@ This function computes the fan or pump efficiency for given normalized volume fl and performance data. The efficiency is

- η = s(rV, d), + η = s(V̇/rN, d),

where η is the efficiency, -rV is the normalized volume flow rate, and +rN is the normalized fan speed, + is the volume flow rate, and d are performance data for fan or pump efficiency.

Implementation

@@ -414,14 +464,33 @@ The function s(·, ·) is a cubic hermite spline. If the data d define a monotone decreasing sequence, then s(·, d) is a monotone decreasing function.

-", revisions=" +", + revisions=" -")); +"), smoothOrder=1); end efficiency; annotation (Documentation(info=" @@ -430,40 +499,11 @@ This package implements performance curves for fans and pumps, and records for parameter that can be used with these performance curves.

- -The following performance curves are implemented:
- - - - - - - - - - - - - - - - - - - - - - - - - -
Independent variableDependent variableRecord for performance dataFunction
Volume flow ratePressure -flowParameters -pressure
Relative volumetric flow rateEfficiency -efficiencyParameters -efficiency
Volume flow ratePower -powerParameters -power
+

+See the + +User's Guide for information about these performance curves. +

", revisions="