diff --git a/IBPSA/Obsolete/Fluid/Movers/BaseClasses/PartialFlowMachine.mo b/IBPSA/Obsolete/Fluid/Movers/BaseClasses/PartialFlowMachine.mo deleted file mode 100644 index 8521e6e7de..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/BaseClasses/PartialFlowMachine.mo +++ /dev/null @@ -1,815 +0,0 @@ -within IBPSA.Obsolete.Fluid.Movers.BaseClasses; -partial model PartialFlowMachine - "Partial model to interface fan or pump models with the medium" - extends IBPSA.Obsolete.BaseClasses.ObsoleteModel; - extends IBPSA.Fluid.Interfaces.LumpedVolumeDeclarations( - final massDynamics=energyDynamics, - final mSenFac=1); - extends IBPSA.Fluid.Interfaces.PartialTwoPort( - port_a( - p(start=Medium.p_default), - h_outflow(start=h_outflow_start)), - port_b( - p(start=p_start), - h_outflow(start=h_outflow_start))); - - replaceable parameter IBPSA.Obsolete.Fluid.Movers.Data.Generic per - constrainedby IBPSA.Obsolete.Fluid.Movers.Data.Generic - "Record with performance data" - annotation (choicesAllMatching=true, - Placement(transformation(extent={{52,60},{72,80}}))); - - parameter IBPSA.Fluid.Types.InputType inputType = IBPSA.Fluid.Types.InputType.Continuous - "Control input type" - annotation(Dialog( - group="Control")); - parameter Real constInput = 0 "Constant input set point" - annotation(Dialog( - group="Control", - enable=inputType == IBPSA.Fluid.Types.InputType.Constant)); - parameter Real stageInputs[:] - "Vector of input set points corresponding to stages" - annotation(Dialog( - group="Control", - enable=inputType == IBPSA.Fluid.Types.InputType.Stages)); - - parameter Boolean computePowerUsingSimilarityLaws - "= true, compute power exactly, using similarity laws. Otherwise approximate."; - - parameter Boolean addPowerToMedium=true - "Set to false to avoid any power (=heat and flow work) being added to medium (may give simpler equations)"; - - parameter Boolean nominalValuesDefineDefaultPressureCurve = false - "Set to true to avoid warning if m_flow_nominal and dp_nominal are used to construct the default pressure curve"; - - parameter Modelica.Units.SI.Time tau=1 - "Time constant of fluid volume for nominal flow, used if energy or mass balance is dynamic" - annotation (Dialog( - tab="Dynamics", - group="Nominal condition", - enable=energyDynamics <> Modelica.Fluid.Types.Dynamics.SteadyState)); - - // Classes used to implement the filtered speed - parameter Boolean use_inputFilter=true - "= true, if speed is filtered with a 2nd order CriticalDamping filter" - annotation(Dialog(tab="Dynamics", group="Filtered speed")); - parameter Modelica.Units.SI.Time riseTime=30 - "Rise time of the filter (time to reach 99.6 % of the speed)" annotation ( - Dialog( - tab="Dynamics", - group="Filtered speed", - enable=use_inputFilter)); - parameter Modelica.Blocks.Types.Init init=Modelica.Blocks.Types.Init.InitialOutput - "Type of initialization (no init/steady state/initial state/initial output)" - annotation(Dialog(tab="Dynamics", group="Filtered speed",enable=use_inputFilter)); - - // Connectors and ports - Modelica.Blocks.Interfaces.IntegerInput stage - if inputType == IBPSA.Fluid.Types.InputType.Stages - "Stage input signal for the pressure head" - annotation (Placement( - transformation( - extent={{-20,-20},{20,20}}, - rotation=270, - origin={0,120}))); - - Modelica.Blocks.Interfaces.RealOutput y_actual( - final unit="1") - "Actual normalised fan or pump speed that is used for computations" - annotation (Placement(transformation(extent={{100,60},{120,80}}), - iconTransformation(extent={{100,60},{120,80}}))); - - Modelica.Blocks.Interfaces.RealOutput P( - quantity="Power", - final unit="W") "Electrical power consumed" - annotation (Placement(transformation(extent={{100,80},{120,100}}), - iconTransformation(extent={{100,80},{120,100}}))); - - Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPort - "Heat dissipation to environment" - annotation (Placement(transformation(extent={{-70,-110},{-50,-90}}), - iconTransformation(extent={{-10,-78},{10,-58}}))); - - // Variables - Modelica.Units.SI.VolumeFlowRate VMachine_flow(start=_VMachine_flow) = eff.V_flow - "Volume flow rate"; - Modelica.Units.SI.PressureDifference dpMachine(displayUnit="Pa") = -preSou.dp - "Pressure difference"; - - Real eta(unit="1", final quantity="Efficiency") = eff.eta "Global efficiency"; - Real etaHyd(unit="1", final quantity="Efficiency") = eff.etaHyd "Hydraulic efficiency"; - Real etaMot(unit="1", final quantity="Efficiency") = eff.etaMot "Motor efficiency"; - - // Quantity to control - - // Copied from Fluid.Interfaces.PartialTwoPortInterface - parameter Modelica.Units.SI.MassFlowRate m_flow_small(min=0) = 1E-4*abs( - _m_flow_nominal) "Small mass flow rate for regularization of zero flow" - annotation (Dialog(tab="Advanced")); - // Diagnostics - parameter Boolean show_T = false - "= true, if actual temperature at port is computed" - annotation ( - Dialog(tab="Advanced", group="Diagnostics"), - HideResult=true); - - Modelica.Units.SI.MassFlowRate m_flow(start=_m_flow_start) = port_a.m_flow - "Mass flow rate from port_a to port_b (m_flow > 0 is design flow direction)"; - - Modelica.Units.SI.PressureDifference dp( - start=_dp_start, - displayUnit="Pa") = port_a.p - port_b.p - "Pressure difference between port_a and port_b"; - - Medium.ThermodynamicState sta_a= - 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))) - if show_T "Medium properties in port_a"; - - Medium.ThermodynamicState sta_b= - 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)) - if show_T "Medium properties in port_b"; - // - Copy continues in protected section - -protected - parameter Modelica.Units.SI.MassFlowRate _m_flow_nominal= - max(eff.per.pressure.V_flow)*rho_default - "Nominal mass flow rate"; - - // Copied from Fluid.Interfaces.PartialTwoPortInterface - final parameter Modelica.Units.SI.MassFlowRate _m_flow_start=0 - "Start value for m_flow, used to avoid a warning if not set in m_flow, and to avoid m_flow.start in parameter window"; - final parameter Modelica.Units.SI.PressureDifference _dp_start(displayUnit= - "Pa") = 0 - "Start value for dp, used to avoid a warning if not set in dp, and to avoid dp.start in parameter window"; - // - End of copy - - final parameter Modelica.Units.SI.VolumeFlowRate _VMachine_flow=0 - "Start value for VMachine_flow, used to avoid a warning if not specified"; - - parameter IBPSA.Fluid.Movers.BaseClasses.Types.PrescribedVariable preVar "Type of prescribed variable"; - - // The parameter speedIsInput is required to conditionally remove the instance gain. - // If the conditional removal of this instance where to use the test - // preVar == IBPSA.Fluid.Movers.BaseClasses.Types.PrescribedVariable.Speed, - // then OpenModelica fails to translate the model with the message - // .../PartialFlowMachine.mo:185:3-189:70:writable] - // Error: Variable Types.PrescribedVariable.Speed not found in scope - // IBPSA.Fluid.Movers.SpeedControlled_y$floMac1. - final parameter Boolean speedIsInput= - (preVar == IBPSA.Fluid.Movers.BaseClasses.Types.PrescribedVariable.Speed) - "Parameter that is true if speed is the controlled variables"; - - final parameter Integer nOri = size(per.pressure.V_flow, 1) - "Number of data points for pressure curve" - annotation(Evaluate=true); - - final parameter Boolean haveVMax = eff.haveVMax - "Flag, true if user specified data that contain V_flow_max"; - - final parameter Modelica.Units.SI.VolumeFlowRate V_flow_max=eff.V_flow_max; - final parameter Modelica.Units.SI.Density rho_default= - Medium.density_pTX( - p=Medium.p_default, - T=Medium.T_default, - X=Medium.X_default) "Default medium density"; - - final parameter Medium.ThermodynamicState sta_start=Medium.setState_pTX( - T=T_start, - p=p_start, - X=X_start) "Medium state at start values"; - - final parameter Modelica.Units.SI.SpecificEnthalpy h_outflow_start= - Medium.specificEnthalpy(sta_start) "Start value for outflowing enthalpy"; - - final parameter Modelica.Units.SI.Frequency fCut=5/(2*Modelica.Constants.pi* - riseTime) "Cut-off frequency of filter"; - - Modelica.Blocks.Sources.Constant[size(stageInputs, 1)] stageValues( - final k=stageInputs) - if inputType == IBPSA.Fluid.Types.InputType.Stages "Stage input values" - annotation (Placement(transformation(extent={{-80,40},{-60,60}}))); - Modelica.Blocks.Sources.Constant setConst( - final k=constInput) - if inputType == IBPSA.Fluid.Types.InputType.Constant - "Constant input set point" - annotation (Placement(transformation(extent={{-80,70},{-60,90}}))); - - Extractor extractor(final nin=size(stageInputs,1)) - if inputType == IBPSA.Fluid.Types.InputType.Stages "Stage input extractor" - annotation (Placement(transformation(extent={{-50,60},{-30,40}}))); - - Modelica.Blocks.Routing.RealPassThrough inputSwitch - "Dummy connection for easy connection of input options" - annotation ( - Placement(transformation( - extent={{-10,-10},{10,10}}, - origin={-10,50}))); - - IBPSA.Fluid.Delays.DelayFirstOrder vol( - redeclare final package Medium = Medium, - final tau=tau, - final energyDynamics=energyDynamics, - final T_start=T_start, - final X_start=X_start, - final C_start=C_start, - final m_flow_nominal=_m_flow_nominal, - final m_flow_small=m_flow_small, - final p_start=p_start, - final prescribedHeatFlowRate=true, - final allowFlowReversal=allowFlowReversal, - nPorts=2) "Fluid volume for dynamic model" - annotation (Placement(transformation(extent={{-70,0},{-90,20}}))); - - IBPSA.Fluid.BaseClasses.ActuatorFilter filter( - final n=2, - final f=fCut, - final normalized=true, - final initType=init) if use_inputFilter - "Second order filter to approximate dynamics of the fan or pump's speed, and to improve numerics" - annotation (Placement(transformation(extent={{20,61},{40,80}}))); - - Modelica.Blocks.Math.Gain gaiSpe(y(final unit="1")) - if inputType == IBPSA.Fluid.Types.InputType.Continuous and - speedIsInput - "Gain to normalized speed using speed_nominal or speed_rpm_nominal" - annotation (Placement(transformation(extent={{-4,74},{-16,86}}))); - - IBPSA.Fluid.Movers.BaseClasses.IdealSource preSou( - redeclare final package Medium = Medium, - final m_flow_small=m_flow_small, - final allowFlowReversal=allowFlowReversal, - final control_m_flow= (preVar == IBPSA.Fluid.Movers.BaseClasses.Types.PrescribedVariable.FlowRate)) - "Pressure source" - annotation (Placement(transformation(extent={{40,-10},{60,10}}))); - - IBPSA.Fluid.Movers.BaseClasses.PowerInterface heaDis( - final motorCooledByFluid=per.motorCooledByFluid, - final delta_V_flow=1E-3*V_flow_max) - if addPowerToMedium "Heat dissipation into medium" - annotation (Placement(transformation(extent={{20,-80},{40,-60}}))); - - Modelica.Blocks.Math.Add PToMed(final k1=1, final k2=1) - if addPowerToMedium "Heat and work input into medium" - annotation (Placement(transformation(extent={{50,-90},{70,-70}}))); - - Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow prePow( - final alpha=0) - if addPowerToMedium - "Prescribed power (=heat and flow work) flow for dynamic model" - annotation (Placement(transformation(extent={{-14,-104},{-34,-84}}))); - - Modelica.Blocks.Sources.RealExpression rho_inlet(y= - Medium.density( - Medium.setState_phX(port_a.p, - inStream(port_a.h_outflow), - inStream(port_a.Xi_outflow)))) - "Density of the inflowing fluid" - annotation (Placement(transformation(extent={{-90,-74},{-70,-54}}))); - - IBPSA.Fluid.Sensors.MassFlowRate senMasFlo( - redeclare final package Medium = Medium) "Mass flow rate sensor" - annotation (Placement(transformation(extent={{-50,10},{-30,-10}}))); - - IBPSA.Fluid.Sensors.RelativePressure senRelPre( - redeclare final package Medium = Medium) "Head of mover" - annotation (Placement(transformation(extent={{58,-27},{43,-14}}))); - - // Because the speed data are not used by FlowMachineInterface, we set them - // to zero. - IBPSA.Fluid.Movers.BaseClasses.FlowMachineInterface eff( - per( - final powerOrEfficiencyIsHydraulic = per.powerOrEfficiencyIsHydraulic, - final efficiency = per.efficiency, - final motorEfficiency = per.motorEfficiency, - final motorEfficiency_yMot = per.motorEfficiency_yMot, - final motorCooledByFluid = per.motorCooledByFluid, - final speed_nominal = 0, - final constantSpeed = 0, - final speeds = {0}, - final power = per.power, - final peak = per.peak), - final nOri = nOri, - final rho_default=rho_default, - final computePowerUsingSimilarityLaws=computePowerUsingSimilarityLaws, - r_V(start=_m_flow_nominal/rho_default), - final preVar=preVar) "Flow machine" - annotation (Placement(transformation(extent={{-32,-68},{-12,-48}}))); - -protected - block Extractor - "Extract scalar signal out of signal vector dependent on IntegerRealInput index" - extends Modelica.Blocks.Interfaces.MISO; - - Modelica.Blocks.Interfaces.IntegerInput index "Integer input for control input" - annotation (Placement( - transformation( - origin={0,-120}, - extent={{-20,-20},{20,20}}, - rotation=90))); - equation - y = sum({if index == i then u[i] else 0 for i in 1:nin}); - - annotation (Icon(graphics={ - Rectangle( - extent={{-80,50},{-40,-50}}, - lineColor={0,0,127}, - fillColor={255,255,255}, - fillPattern=FillPattern.Solid), - Polygon( - points={{-84.4104,1.9079},{-84.4104,-2.09208},{-80.4104,-0.09208},{ - -84.4104,1.9079}}, - lineColor={0,0,127}, - fillColor={0,0,0}, - fillPattern=FillPattern.Solid), - Line(points={{-62,2},{-50.1395,12.907},{-39.1395,12.907}}, color={0,0, - 127}), - Line(points={{-63,4},{-49,40},{-39,40}}, color={0,0,127}), - Line(points={{-102,0},{-65.0373,-0.01802}}, color={0,0,127}), - Ellipse( - extent={{-70.0437,4.5925},{-60.0437,-4.90745}}, - lineColor={0,0,127}, - fillColor={0,0,127}, - fillPattern=FillPattern.Solid), - Line(points={{-63,-5},{-50,-40},{-39,-40}}, color={0,0,127}), - Line(points={{-62,-2},{-50.0698,-12.907},{-39.0698,-12.907}}, color={ - 0,0,127}), - Polygon( - points={{-38.8808,-11},{-38.8808,-15},{-34.8808,-13},{-38.8808,-11}}, - lineColor={0,0,127}, - fillColor={255,255,255}, - fillPattern=FillPattern.Solid), - Polygon( - points={{-39,42},{-39,38},{-35,40},{-39,42}}, - lineColor={0,0,127}, - fillColor={255,255,255}, - fillPattern=FillPattern.Solid), - Polygon( - points={{-38.8728,-38.0295},{-38.8728,-42.0295},{-34.8728,-40.0295}, - {-38.8728,-38.0295}}, - lineColor={0,0,127}, - fillColor={255,255,255}, - fillPattern=FillPattern.Solid), - Polygon( - points={{-38.9983,14.8801},{-38.9983,10.8801},{-34.9983,12.8801},{-38.9983, - 14.8801}}, - lineColor={0,0,127}, - fillColor={255,255,255}, - fillPattern=FillPattern.Solid), - Rectangle( - extent={{-30,50},{30,-50}}, - fillColor={235,235,235}, - fillPattern=FillPattern.Solid, - lineColor={0,0,127}), - Line(points={{100,0},{0,0}}, color={0,0,127}), - Line(points={{0,2},{0,-104}}, color={255,128,0}), - Line(points={{-35,40},{-20,40}}, color={0,0,127}), - Line(points={{-35,13},{-20,13}}, color={0,0,127}), - Line(points={{-35,-13},{-20,-13}}, color={0,0,127}), - Line(points={{-35,-40},{-20,-40}}, color={0,0,127}), - Polygon(points={{0,0},{-20,13},{-20,13},{0,0},{0,0}}, lineColor={0,0, - 127}), - Ellipse( - extent={{-6,6},{6,-6}}, - lineColor={255,128,0}, - fillColor={255,128,0}, - fillPattern=FillPattern.Solid)})); - end Extractor; - -initial algorithm - // The control signal is dp or m_flow but the user did not provide a fan or pump curve. - // Hence, the speed is computed using default values, which likely are wrong. - // Therefore, scaling the power using the speed is inaccurate. - assert(nominalValuesDefineDefaultPressureCurve or - per.havePressureCurve or - (preVar == IBPSA.Fluid.Movers.BaseClasses.Types.PrescribedVariable.Speed), -"*** Warning: You are using a flow or pressure controlled mover with the - default pressure curve. - This leads to approximate calculations of the electrical power - consumption. Add the correct pressure curve in the record per - to obtain an accurate computation. - Setting nominalValuesDefineDefaultPressureCurve=true will suppress this warning.", - level=AssertionLevel.warning); - - // The control signal is dp or m_flow but the user did not provide a fan or pump curve. - // Hence, the speed is computed using default values, which likely are wrong. - // In addition, the user wants to use (V_flow, P) to compute the power. - // This can lead to using a power that is less than the flow work. We avoid - // this by ignoring the setting of per.etaHydMet. - // The comment is split into two parts since otherwise the JModelica C-compiler - // throws warnings. - assert(nominalValuesDefineDefaultPressureCurve or - (per.havePressureCurve or - (preVar == IBPSA.Fluid.Movers.BaseClasses.Types.PrescribedVariable.Speed)) or - per.etaHydMet<> - IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.Power_VolumeFlowRate, -"*** Warning: You are using a flow or pressure controlled mover with the - default pressure curve with per.etaHydMet set to - IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.Power_VolumeFlowRate. - Since this can cause wrong power consumption, the model will overwrite - this setting and use instead - IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.NotProvided." + - "See the user guide to see what assumptions are made in this setting - or provide other information to the model. - Setting nominalValuesDefineDefaultPressureCurve=true will suppress this warning.", - level=AssertionLevel.warning); - - assert(per.havePressureCurve or - not (per.etaHydMet == - IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.Power_VolumeFlowRate - or per.etaHydMet == - IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.EulerNumber), -"*** Warning in "+ getInstanceName()+ - ": per.etaHydMet is set to .Power_VolumeFlowRate or .EulerNumber. - This requires that per.pressure be provided. - Because it is not, - the model will override this setting and use .NotProvided instead.", - level=AssertionLevel.warning); - - assert(per.havePressureCurve or per.haveWMot_nominal or - not (per.etaMotMet == - IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.Efficiency_MotorPartLoadRatio - or per.etaMotMet == - IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.GenericCurve), -"*** Warning in "+ getInstanceName()+ - ": per.etaMotMet is set to .Efficiency_MotorPartLoadRatio - or .GenericCurve. This requires that per.WMot_nominal be provided - or at least per.pressure be provided so that per.WMot_nominal can - be estimated. Because neither is provided, - the model will override this setting and use .NotProvided instead.", - level=AssertionLevel.warning); - - assert(per.powerOrEfficiencyIsHydraulic or - not (per.etaMotMet == - IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.Efficiency_MotorPartLoadRatio - or per.etaMotMet == - IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.GenericCurve), -"*** Warning in "+ getInstanceName()+ - ": per.etaMotMet is set to .Efficiency_MotorPartLoadRatio - or .GenericCurve while information is provided for total electric - power instead of hydraulic power. This forms an algebraic loop - and may cause the simulation to not converge - (see the \"Motor efficiency\" section in usersguide).", - level=AssertionLevel.warning); - -equation - connect(prePow.port, vol.heatPort) annotation (Line( - points={{-34,-94},{-60,-94},{-60,10},{-70,10}}, - color={191,0,0})); - - connect(vol.heatPort, heatPort) annotation (Line( - points={{-70,10},{-70,10},{-60,10},{-60,-100}}, - color={191,0,0})); - connect(preSou.port_b, port_b) annotation (Line( - points={{60,0},{100,0}}, - color={0,127,255}, - smooth=Smooth.None)); - connect(stageValues.y, extractor.u) annotation (Line( - points={{-59,50},{-52,50}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(extractor.y, inputSwitch.u) annotation (Line( - points={{-29,50},{-22,50}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(setConst.y, inputSwitch.u) annotation (Line( - points={{-59,80},{-26,80},{-26,50},{-22,50}}, - color={0,0,127}, - smooth=Smooth.None)); - connect(extractor.index, stage) annotation (Line( - points={{-40,62},{-40,90},{0,90},{0,120}}, - color={255,127,0}, - smooth=Smooth.None)); - - connect(PToMed.y, prePow.Q_flow) annotation (Line(points={{71,-80},{80,-80},{80, - -94},{-14,-94}}, color={0,0,127})); - connect(PToMed.u1, heaDis.Q_flow) annotation (Line(points={{48,-74},{44,-74},{ - 44,-72},{44,-70},{41,-70}}, - color={0,0,127})); - - connect(senRelPre.port_b, preSou.port_a) annotation (Line(points={{43,-20.5},{ - 20,-20.5},{20,0},{40,0}}, - color={0,127,255})); - connect(senRelPre.port_a, preSou.port_b) annotation (Line(points={{58,-20.5},{ - 80,-20.5},{80,0},{60,0}}, - color={0,127,255})); - connect(heaDis.V_flow,eff. V_flow) annotation (Line(points={{18,-60},{14,-60}, - {14,-52},{-11,-52}}, color={0,0,127})); - connect(eff.PEle, heaDis.PEle) annotation (Line(points={{-11,-60},{0,-60},{0, - -80},{18,-80}}, color={0,0,127})); - connect(eff.WFlo, heaDis.WFlo) annotation (Line(points={{-11,-56},{4,-56},{4, - -66},{18,-66}}, color={0,0,127})); - connect(rho_inlet.y,eff. rho) annotation (Line(points={{-69,-64},{-69,-64},{-34, - -64}}, color={0,0,127})); - connect(eff.m_flow, senMasFlo.m_flow) annotation (Line(points={{-34,-54},{-34, - -54},{-40,-54},{-40,-11}}, color={0,0,127})); - connect(eff.WFlo, PToMed.u2) annotation (Line(points={{-11,-56},{4,-56},{4, - -86},{48,-86}}, color={0,0,127})); - connect(inputSwitch.y, filter.u) annotation (Line(points={{1,50},{12,50},{12,70.5}, - {18,70.5}}, color={0,0,127})); - - connect(senRelPre.p_rel, eff.dp_in) annotation (Line(points={{50.5,-26.35},{50.5, - -38},{-18,-38},{-18,-46}}, color={0,0,127})); - connect(eff.y_out, y_actual) annotation (Line(points={{-11,-48},{92,-48},{92, - 70},{110,70}}, - color={0,0,127})); - connect(port_a, vol.ports[1]) - annotation (Line(points={{-100,0},{-79,0},{-79,0}}, color={0,127,255})); - connect(vol.ports[2], senMasFlo.port_a) - annotation (Line(points={{-81,0},{-81,0},{-50,0}}, color={0,127,255})); - connect(senMasFlo.port_b, preSou.port_a) - annotation (Line(points={{-30,0},{40,0},{40,0}}, color={0,127,255})); - connect(eff.WHyd, heaDis.WHyd) annotation (Line(points={{-11,-58},{2,-58},{2, - -74},{18,-74}}, color={0,0,127})); - connect(eff.PEle, P) annotation (Line(points={{-11,-60},{0,-60},{0,-50},{90, - -50},{90,90},{110,90}}, - color={0,0,127})); - annotation(Icon(coordinateSystem(preserveAspectRatio=false, - extent={{-100,-100},{100,100}}), - graphics={ - Line( - points={{0,70},{100,70}}, - color={0,0,0}, - smooth=Smooth.None), - Line( - points={{0,90},{100,90}}, - color={0,0,0}, - smooth=Smooth.None), - Line( - visible=not use_inputFilter, - points={{0,100},{0,40}}), - Rectangle( - extent={{-100,16},{100,-16}}, - lineColor={0,0,0}, - fillColor={0,127,255}, - fillPattern=FillPattern.HorizontalCylinder), - Ellipse( - extent={{-58,58},{58,-58}}, - lineColor={0,0,0}, - fillPattern=FillPattern.Sphere, - fillColor={0,100,199}), - Polygon( - points={{0,50},{0,-50},{54,0},{0,50}}, - lineColor={0,0,0}, - pattern=LinePattern.None, - fillPattern=FillPattern.HorizontalCylinder, - fillColor={255,255,255}), - Ellipse( - extent={{4,16},{36,-16}}, - lineColor={0,0,0}, - fillPattern=FillPattern.Sphere, - visible=energyDynamics <> Modelica.Fluid.Types.Dynamics.SteadyState, - fillColor={0,100,199}), - Text(extent={{64,106},{114,92}}, - textColor={0,0,127}, - textString="P"), - Text(extent={{42,86},{92,72}}, - textColor={0,0,127}, - textString="y_actual"), - Line( - points={{0,100},{0,50}}, - color={0,0,0}, - smooth=Smooth.None), - Rectangle( - visible=use_inputFilter, - extent={{-32,40},{34,100}}, - lineColor={0,0,0}, - fillColor={135,135,135}, - fillPattern=FillPattern.Solid), - Ellipse( - visible=use_inputFilter, - extent={{-32,100},{34,40}}, - lineColor={0,0,0}, - fillColor={135,135,135}, - fillPattern=FillPattern.Solid), - Text( - visible=use_inputFilter, - extent={{-20,92},{22,46}}, - textColor={0,0,0}, - fillColor={135,135,135}, - fillPattern=FillPattern.Solid, - textString="M", - textStyle={TextStyle.Bold})}), - obsolete = "Obsolete model - use IBPSA.Fluid.Movers.BaseClasses.PartialFlowMachine instead", -Documentation(info=" -
-This is the base model for fans and pumps. -It provides an interface -between the equations that compute head and power consumption, -and the implementation of the energy and pressure balance -of the fluid. -
--Optionally, the fluid volume -is computed using a dynamic balance or a steady-state balance. -
-
-The parameter addPowerToMedium
determines whether
-any power is added to the fluid. The default is addPowerToMedium=true
,
-and hence the outlet enthalpy is higher than the inlet enthalpy if the
-flow device is operating.
-The setting addPowerToMedium=false
is physically incorrect
-(since the flow work, the flow friction and the fan heat do not increase
-the enthalpy of the medium), but this setting does in some cases lead to simpler equations
-and more robust simulation, in particular if the mass flow is equal to zero.
-
-In the previous implementation, this model extends from
-
-IBPSA.Fluid.Interfaces.PartialTwoPortInterface.
-Now it copies much of the code instead.
-This is to resolve a potential circular parameter binding that occurs when
-
-IBPSA.Fluid.Movers.Preconfigured.SpeedControlled_y
-extends from
-
-IBPSA.Fluid.Movers.SpeedControlled_y.
-The former uses the nominal flow rate provided by user to construct
-the pressure curve, whilst the latter uses the user-provided pressure curve
-to determine the nominal flow rate. The new implementation removes the
-original declaration of nominal flow rate from
-
-IBPSA.Fluid.Interfaces.PartialTwoPortInterface
-and hides it (protected _m_flow_nominal
) from the user.
-This way, A higher-level model (e.g.
-
-IBPSA.Fluid.Movers.FlowControlled_dp),
-can still provide a default but not the other way around.
-See discussions in
-#1705.
-
m_flow_nominal
-as protected _m_flow_nominal
.haveVMax
from here to
-
-IBPSA.Fluid.Movers.BaseClasses.FlowMachineInterface
-and V_flow_max
from here to
-
-IBPSA.Fluid.Movers.Data.Generic.
-per.peak
, per.totalEfficiency,
,
-per.motorEfficiency_yMot
to be also passed down to eff.per
-at instantiation.
-assert()
warning when the model has to make an unreliable
-guess for efficiency computation using .EulerNumber
.
-assert()
warning when the model has to overwrite
-per.etaMotMet
.
-m_flow_nominal
.filteredSpeed
to use_inputFilter
.min
attribute as otherwise numerical noise can cause
-the assertion on the limit to fail.VMachine_flow
to avoid a warning in
-
-IBPSA.Fluid.Movers.Examples.MoverContinuous.
-Extractor
protected so that it can be removed later
-with a backwards compatible change.
-dp
and m_flow
when having
-compressible flow.
-This is for
-#458.
-dynamicBalance
.
-This is for
-#411.
-showDesignFlowDirection
in extends
statement.
-This is for
-#349.
-Removed assignment of min
and max
attributes
-of the port mass flow rate as this is already done in the base class.
-Removed import
statement.
-m_flow_small
of instance vol
and made
-all its parameters final.
--This package contains base classes that are used to construct the models in - -IBPSA.Obsolete.Fluid.Movers. -
-")); -end BaseClasses; diff --git a/IBPSA/Obsolete/Fluid/Movers/BaseClasses/package.order b/IBPSA/Obsolete/Fluid/Movers/BaseClasses/package.order deleted file mode 100644 index 1de5c0a7f0..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/BaseClasses/package.order +++ /dev/null @@ -1 +0,0 @@ -PartialFlowMachine diff --git a/IBPSA/Obsolete/Fluid/Movers/Data/Generic.mo b/IBPSA/Obsolete/Fluid/Movers/Data/Generic.mo deleted file mode 100644 index 71ba99f159..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/Data/Generic.mo +++ /dev/null @@ -1,300 +0,0 @@ -within IBPSA.Obsolete.Fluid.Movers.Data; -record Generic "Generic data record for movers" - extends Modelica.Icons.Record; - - // Pressure requires default values to avoid in Dymola the message - // Failed to expand the variable pressure.V_flow. - parameter IBPSA.Fluid.Movers.BaseClasses.Characteristics.flowParameters pressure( - V_flow = {0, 0}, - dp = {0, 0}) "Volume flow rate vs. total pressure rise" - annotation(Evaluate=true, - Dialog(group="Pressure curve")); - parameter Modelica.Units.SI.VolumeFlowRate V_flow_max= - if havePressureCurve - then (pressure.V_flow[end] - -(pressure.V_flow[end] - pressure.V_flow[end - 1]) - /(pressure.dp[end] - pressure.dp[end - 1]) - * pressure.dp[end]) - else 0 - "Volume flow rate on the curve when pressure rise is zero"; - parameter Modelica.Units.SI.PressureDifference dpMax(displayUnit="Pa")= - if havePressureCurve - then (pressure.dp[1] - -(pressure.dp[1] - pressure.dp[2]) - /(pressure.V_flow[1] - pressure.V_flow[2]) - * pressure.V_flow[1]) - else 0 - "Pressure rise on the curve when flow rate is zero"; - - // Efficiency computation choices - parameter IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod etaHydMet= - IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.EulerNumber - "Efficiency computation method for the hydraulic efficiency etaHyd" - annotation (Dialog(group="Power computation")); - parameter IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod etaMotMet= - if powerOrEfficiencyIsHydraulic - then IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.GenericCurve - else IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.NotProvided - "Efficiency computation method for the motor efficiency etaMot" - annotation (Dialog(group="Power computation")); - - parameter Boolean powerOrEfficiencyIsHydraulic=true - "=true if hydraulic power or efficiency is provided, instead of total" - annotation (Dialog(group="Power computation", - enable=max(power.P)>Modelica.Constants.eps - or max(efficiency.eta)>Modelica.Constants.eps)); - - // Arrays for efficiency values - parameter - IBPSA.Fluid.Movers.BaseClasses.Characteristics.efficiencyParameters - efficiency( - V_flow={0}, - eta={0.7}) "Total or hydraulic efficiency vs. volumetric flow rate" - annotation (Dialog(group="Power computation", - enable=etaHydMet == IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.Efficiency_VolumeFlowRate)); - parameter - IBPSA.Fluid.Movers.BaseClasses.Characteristics.efficiencyParameters - motorEfficiency( - V_flow={0}, - eta={0.7}) - "Motor efficiency vs. volumetric flow rate" - annotation (Dialog(group="Power computation", - enable=etaMotMet == IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.Efficiency_VolumeFlowRate)); - parameter - IBPSA.Fluid.Movers.BaseClasses.Characteristics.efficiencyParameters_yMot - motorEfficiency_yMot(y={0}, eta={0.7}) - "Motor efficiency vs. part load ratio yMot, where yMot = WHyd/WMot_nominal" - annotation (Dialog(group="Power computation", enable=etaMotMet == - IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.Efficiency_MotorPartLoadRatio)); - - // Power curve - // It requires default values to suppress Dymola message - // "Failed to expand the variable Power.V_flow" - parameter IBPSA.Fluid.Movers.BaseClasses.Characteristics.powerParameters power( - V_flow={0}, - P={0}) - "Power (either consumed or hydraulic) vs. volumetric flow rate" - annotation (Dialog(group="Power computation", - enable = etaHydMet== - IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.Power_VolumeFlowRate)); - - // Peak condition - parameter IBPSA.Fluid.Movers.BaseClasses.Euler.peak peak( - V_flow=peak_internal.V_flow, - dp=peak_internal.dp, - eta=peak_internal.eta) - "Volume flow rate, pressure rise, and efficiency (either total or hydraulic) at peak condition" - annotation (Dialog(group="Power computation", - enable = etaHydMet== - IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.EulerNumber)); - final parameter IBPSA.Fluid.Movers.BaseClasses.Euler.peak peak_internal= - IBPSA.Fluid.Movers.BaseClasses.Euler.getPeak(pressure=pressure,power=power) - "Internal peak variable"; - // The getPeak() function automatically handles the estimation of peak point - // when insufficient information is provided from the pressure curve. - - // Motor - parameter Boolean motorCooledByFluid=true - "If true, then motor heat is added to fluid stream" - annotation(Dialog(group="Motor heat rejection")); - parameter Modelica.Units.SI.Power WMot_nominal= - if max(power.P)>Modelica.Constants.eps - then - if powerOrEfficiencyIsHydraulic - then max(power.P)*1.2 - else max(power.P) - else - if havePressureCurve - then V_flow_max/2 * dpMax/2 /0.7*1.2 - else 0 - "Rated motor power" - annotation(Dialog(group="Power computation", - enable= etaMotMet== - IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.Efficiency_MotorPartLoadRatio - or etaMotMet== - IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.GenericCurve)); - parameter Modelica.Units.SI.Efficiency etaMot_max(max=1)= 0.7 - "Maximum motor efficiency" - annotation (Dialog(group="Power computation", enable=etaMotMet == - IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.GenericCurve)); - final parameter - IBPSA.Fluid.Movers.BaseClasses.Characteristics.efficiencyParameters_yMot - motorEfficiency_yMot_generic= - IBPSA.Fluid.Movers.BaseClasses.Characteristics.motorEfficiencyCurve( - P_nominal=WMot_nominal, - eta_max=etaMot_max) - "Motor efficiency vs. part load ratio" - annotation (Dialog(enable=false)); - final parameter Boolean haveWMot_nominal=WMot_nominal > Modelica.Constants.eps - "= true, if the rated motor power is provided"; - - // Speed - parameter Real speed_nominal( - final min=0, - final unit="1") = 1 "Nominal rotational speed for flow characteristic" - annotation (Dialog(group="Normalized speeds (used in model, default values assigned from speeds in rpm)")); - - parameter Real constantSpeed(final min=0, final unit="1") = constantSpeed_rpm/speed_rpm_nominal - "Normalized speed set point, used if inputType = IBPSA.Fluid.Types.InputType.Constant" - annotation (Dialog(group="Normalized speeds (used in model, default values assigned from speeds in rpm)")); - - parameter Real[:] speeds(each final min = 0, each final unit="1") = speeds_rpm/speed_rpm_nominal - "Vector of normalized speed set points, used if inputType = IBPSA.Fluid.Types.InputType.Stages" - annotation (Dialog(group="Normalized speeds (used in model, default values assigned from speeds in rpm)")); - - parameter Modelica.Units.NonSI.AngularVelocity_rpm speed_rpm_nominal=1500 - "Nominal rotational speed for flow characteristic" - annotation (Dialog(group="Speeds in RPM")); - - parameter Modelica.Units.NonSI.AngularVelocity_rpm constantSpeed_rpm= - speed_rpm_nominal - "Speed set point, used if inputType = IBPSA.Fluid.Types.InputType.Constant" - annotation (Dialog(group="Speeds in RPM")); - - parameter Modelica.Units.NonSI.AngularVelocity_rpm[:] speeds_rpm={ - speed_rpm_nominal} - "Vector of speed set points, used if inputType = IBPSA.Fluid.Types.InputType.Stages" - annotation (Dialog(group="Speeds in RPM")); - - // Set a parameter in order for - // (a) FlowControlled_m_flow and FlowControlled_dp to be able to set a reasonable - // default pressure curve if it is not specified here, and - // (b) SpeedControlled_y to be able to issue an assert - // if no pressure curve is specified. - final parameter Boolean havePressureCurve= - sum(pressure.V_flow) > Modelica.Constants.eps and - sum(pressure.dp) > Modelica.Constants.eps - "= true, if default record values are being used"; - - annotation ( - defaultComponentPrefixes = "parameter", - defaultComponentName = "per", - Documentation(revisions=" -V_flow_max
here from
-
-IBPSA.Fluid.Movers.BaseClasses.PartialFlowMachine
-and dpMax
here from
-
-IBPSA.Fluid.Movers.BaseClasses.FlowMachineInterface
-SpeedControlled_Nrpm
,
-SpeedControlled_y
and FlowControlled
-are integrated into one record.
-This is for
-#417.
-N_nominal
to
-speed_rpm_nominal
as it is the same quantity as speeds_rmp
.
-This is for
-#396.
-speeds_rpm
.
-This is for
-#396.
--Record containing parameters for pumps or fans. -
--This record may be used to assign for example fan performance data using -declaration such as -
-- IBPSA.Fluid.Movers.SpeedControlled_y fan( - redeclare package Medium = Medium, - per(pressure(V_flow={0,m_flow_nominal,2*m_flow_nominal}/1.2, - dp={2*dp_nominal,dp_nominal,0}))) \"Fan\"; --
-This data record can be used with - -IBPSA.Fluid.Movers.SpeedControlled_y, - -IBPSA.Fluid.Movers.FlowControlled_dp, - -IBPSA.Fluid.Movers.FlowControlled_m_flow. -
--An example that uses manufacturer data can be found in - -IBPSA.Fluid.Movers.Validation.Pump_y_stratos. -
-
-The variable peak
is intentionally declared in a way that each of its
-element is declared individually. If it was delcared the same way as does
-peak_internal
, Modelica would prevent the modification of its
-specific elements with the following error message:
-
-Record has a value, and attempt to modify specific elements.
-The other variable
-The element modification of e.g. V_flow will be ignored.
-peak_internal
uses a function call to compute its
-default values. By passing them to peak
one by one, the model can
-both have default values and also allow the user to override them easily.
-See
-Modelica Specification issue #791.
-
-The parameters speed_rpm_nominal
,
-constantSpeed_rpm
and
-speeds_rpm
are used to assign the non-dimensional speeds
-
- parameter Real constantSpeed(final min=0, final unit=\"1\") = constantSpeed_rpm/speed_rpm_nominal; - parameter Real[:] speeds(each final min = 0, each final unit=\"1\") = speeds_rpm/speed_rpm_nominal; --
-Flow-controlled models do not these speed parameters in RPM. -
-")); -end Generic; diff --git a/IBPSA/Obsolete/Fluid/Movers/Data/Pumps/Wilo/Stratos25slash1to4.mo b/IBPSA/Obsolete/Fluid/Movers/Data/Pumps/Wilo/Stratos25slash1to4.mo deleted file mode 100644 index aaba3f0d52..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/Data/Pumps/Wilo/Stratos25slash1to4.mo +++ /dev/null @@ -1,69 +0,0 @@ -within IBPSA.Obsolete.Fluid.Movers.Data.Pumps.Wilo; -record Stratos25slash1to4 "Pump data for a Wilo Stratos 25/1-4 pump" - extends Generic( - speed_rpm_nominal=1800, - final powerOrEfficiencyIsHydraulic=false, - etaHydMet=IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.Power_VolumeFlowRate, - power(V_flow={5.55555555556e-07, 0.000402190923318, 0.00052269170579, - 0.000643192488263, 0.000752738654147, 0.000866979655712, - 0.000973395931142, 0.00108607198748, 0.00115962441315}, - P={ 14.2085618951, 21.2596204596, 23.3573239437, - 25.1349149442, 26.581943662, 27.9121571534, - 28.8498841148, 29.4981726255, 29.7520982304}), - pressure(V_flow={5.55555555556e-07, 0.000402190923318, 0.00052269170579, - 0.000643192488263, 0.000752738654147, 0.000866979655712, - 0.000973395931142, 0.00108607198748, 0.00115962441315}, - dp={ 17066.9518717, 16997.0053476, 16437.4331551, - 15528.1283422, 14408.9839572, 13149.9465241, - 11681.0695187, 9932.40641711, 8533.47593583})); - annotation ( -defaultComponentPrefixes="parameter", -defaultComponentName="per", -Documentation(info=" -Data from: - - http://productfinder.wilo.com/en/COM/product/0000000e000379df0002003a/fc_product_datasheet - -
-See - - IBPSA.Fluid.Movers.Data.Pumps.Wilo.Stratos25slash1to6 - - for more information about how the data is derived. -
- ", - revisions=" -use_powerCharacteristic
-to support the implementation of
-
-IBPSA.Fluid.Movers.BaseClasses.Euler
.
-This is for
-#2668.
-defaultComponentPrefixes
and
-defaultComponentName
annotations.
-Data from: - - http://productfinder.wilo.com/en/COM/product/0000000e000379df0002003a/fc_product_datasheet - -
-See - - IBPSA.Fluid.Movers.Data.Pumps.Wilo.Stratos25slash1to6 - - for more information about how the data is derived. -
- ", revisions=" -use_powerCharacteristic
-to support the implementation of
-
-IBPSA.Fluid.Movers.BaseClasses.Euler
.
-This is for
-#2668.
-defaultComponentPrefixes
and
-defaultComponentName
annotations.
--This package contains performance data for Wilo pumps. -
-")); -end Wilo; diff --git a/IBPSA/Obsolete/Fluid/Movers/Data/Pumps/Wilo/package.order b/IBPSA/Obsolete/Fluid/Movers/Data/Pumps/Wilo/package.order deleted file mode 100644 index eebe7fed12..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/Data/Pumps/Wilo/package.order +++ /dev/null @@ -1,2 +0,0 @@ -Stratos25slash1to4 -Stratos32slash1to12 diff --git a/IBPSA/Obsolete/Fluid/Movers/Data/Pumps/package.mo b/IBPSA/Obsolete/Fluid/Movers/Data/Pumps/package.mo deleted file mode 100644 index 39a4c1c74e..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/Data/Pumps/package.mo +++ /dev/null @@ -1,15 +0,0 @@ -within IBPSA.Obsolete.Fluid.Movers.Data; -package Pumps "Package containing data for pumps" - extends Modelica.Icons.Package; - -annotation (preferredView="info", Documentation(info=" --This package contains data for pumps. -
--See the - -User's Guide for more information. -
-")); -end Pumps; diff --git a/IBPSA/Obsolete/Fluid/Movers/Data/Pumps/package.order b/IBPSA/Obsolete/Fluid/Movers/Data/Pumps/package.order deleted file mode 100644 index 08113d759f..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/Data/Pumps/package.order +++ /dev/null @@ -1 +0,0 @@ -Wilo diff --git a/IBPSA/Obsolete/Fluid/Movers/Data/package.mo b/IBPSA/Obsolete/Fluid/Movers/Data/package.mo deleted file mode 100644 index 0c62b262fc..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/Data/package.mo +++ /dev/null @@ -1,15 +0,0 @@ -within IBPSA.Obsolete.Fluid.Movers; -package Data "Package containing data for real pumps/fans" -extends Modelica.Icons.MaterialPropertiesPackage; - -annotation (preferredView="info", Documentation(info=" --This package contains data for fans and pumps. -
--See the - -User's Guide for more information. -
-")); -end Data; diff --git a/IBPSA/Obsolete/Fluid/Movers/Data/package.order b/IBPSA/Obsolete/Fluid/Movers/Data/package.order deleted file mode 100644 index 7bbde5448e..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/Data/package.order +++ /dev/null @@ -1,2 +0,0 @@ -Generic -Pumps diff --git a/IBPSA/Obsolete/Fluid/Movers/Examples/MoverContinuous.mo b/IBPSA/Obsolete/Fluid/Movers/Examples/MoverContinuous.mo deleted file mode 100644 index 153c94c3b1..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/Examples/MoverContinuous.mo +++ /dev/null @@ -1,58 +0,0 @@ -within IBPSA.Obsolete.Fluid.Movers.Examples; -model MoverContinuous - "Example model of movers using a real input for setting the stage" - extends IBPSA.Obsolete.Fluid.Movers.Examples.MoverParameter( - pump_Nrpm(inputType=IBPSA.Fluid.Types.InputType.Continuous), - pump_m_flow(inputType=IBPSA.Fluid.Types.InputType.Continuous), - pump_y(inputType=IBPSA.Fluid.Types.InputType.Continuous), - pump_dp(inputType=IBPSA.Fluid.Types.InputType.Continuous)); - Modelica.Blocks.Sources.Ramp ramp(duration=1) "Ramp input for all movers" - annotation (Placement(transformation(extent={{-80,60},{-60,80}}))); - Modelica.Blocks.Math.Gain gaiNrpm(k=2000) "Nominal rpm" - annotation (Placement(transformation(extent={{-40,60},{-20,80}}))); - Modelica.Blocks.Math.Gain gai_m_flow(k=m_flow_nominal) - "Nominal mass flow rate" - annotation (Placement(transformation(extent={{-40,10},{-20,30}}))); - Modelica.Blocks.Math.Gain gai_dp(k=dp_nominal) "Nominal pressure drop" - annotation (Placement(transformation(extent={{-40,-70},{-20,-50}}))); -equation - connect(gaiNrpm.y, pump_Nrpm.Nrpm) - annotation (Line(points={{-19,70},{0,70},{0,52}}, color={0,0,127})); - connect(gai_dp.y, pump_dp.dp_in) annotation (Line(points={{-19,-60},{-10,-60}, - {0,-60},{0,-68}}, color={0,0,127})); - connect(gai_m_flow.y, pump_m_flow.m_flow_in) - annotation (Line(points={{-19,20},{0,20},{0,12}}, color={0,0,127})); - connect(gaiNrpm.u, ramp.y) - annotation (Line(points={{-42,70},{-59,70}}, color={0,0,127})); - connect(gai_m_flow.u, ramp.y) annotation (Line(points={{-42,20},{-50,20},{-50, - 70},{-59,70}}, color={0,0,127})); - connect(gai_dp.u, ramp.y) annotation (Line(points={{-42,-60},{-50,-60},{-50, - 70},{-59,70}}, color={0,0,127})); - connect(pump_y.y, ramp.y) annotation (Line(points={{0,-28},{0,-20},{-50,-20},{ - -50,70},{-59,70}}, color={0,0,127})); - annotation ( - Documentation(info=" -
-This example demonstrates the use of a RealInput
-connector for a mover model.
-
Nrpm
mover.
-This is for
-IBPSA, #1704.
-
-This example demonstrates the use of a Parameter
-set point for a mover model.
-
Nrpm
mover.
-This is for
-IBPSA, #1704.
-
-This example demonstrates the use of the Integer
-stage connector for a mover model.
-Note that integer input 1 refers to the first stage, whereas
-input 0 switches the mover off.
-
Nrpm
mover.
-This is for
-IBPSA, #1704.
--This package contains obsolete example models. -
-")); -end Examples; diff --git a/IBPSA/Obsolete/Fluid/Movers/Examples/package.order b/IBPSA/Obsolete/Fluid/Movers/Examples/package.order deleted file mode 100644 index c004b45a2e..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/Examples/package.order +++ /dev/null @@ -1,3 +0,0 @@ -MoverContinuous -MoverParameter -MoverStages diff --git a/IBPSA/Obsolete/Fluid/Movers/Preconfigured/SpeedControlled_Nrpm.mo b/IBPSA/Obsolete/Fluid/Movers/Preconfigured/SpeedControlled_Nrpm.mo deleted file mode 100644 index c187a91953..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/Preconfigured/SpeedControlled_Nrpm.mo +++ /dev/null @@ -1,61 +0,0 @@ -within IBPSA.Obsolete.Fluid.Movers.Preconfigured; -model SpeedControlled_Nrpm "Fan or pump with ideally controlled speed Nrpm as input signal and pre-configured parameters" - extends IBPSA.Obsolete.Fluid.Movers.SpeedControlled_Nrpm( - final per( - pressure( - V_flow=m_flow_nominal/rho_default*{0, 1, 2}, - dp=if rho_default < 500 - then dp_nominal*{1.12, 1, 0} - else dp_nominal*{1.14, 1, 0.42}), - powerOrEfficiencyIsHydraulic=true, - etaHydMet=IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.EulerNumber, - etaMotMet=IBPSA.Fluid.Movers.BaseClasses.Types.MotorEfficiencyMethod.GenericCurve, - speed_rpm_nominal=speed_rpm_nominal), - final inputType=IBPSA.Fluid.Types.InputType.Continuous, - final init=Modelica.Blocks.Types.Init.InitialOutput, - energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial); - - parameter Modelica.Units.SI.MassFlowRate m_flow_nominal( - final min=Modelica.Constants.small) - "Nominal mass flow rate for configuration of pressure head vs flow rate performance curve" - annotation (Dialog(group="Nominal condition")); - parameter Modelica.Units.SI.PressureDifference dp_nominal( - final min=Modelica.Constants.small) - "Nominal pressure head for configuration of pressure head vs flow rate performance curve" - annotation(Dialog(group="Nominal condition")); - parameter Modelica.Units.NonSI.AngularVelocity_rpm speed_rpm_nominal( - final min=Modelica.Constants.small) - "Nominal rotational speed for configuration of pressure head vs flow rate performance curve" - annotation (Dialog(group="Nominal condition")); - -annotation ( -defaultComponentName="mov", -obsolete = "Obsolete model - use IBPSA.Fluid.Movers.Preconfigured.SpeedControlled_y instead", -Documentation(info=" --This model is the preconfigured version for - -IBPSA.Obsolete.Fluid.Movers.SpeedControlled_Nrpm. -", revisions=" -
m_flow_nominal
.-This model validates the preconfigured mover models. -It is based on - -IBPSA.Obsolete.Fluid.Movers.Validation.ControlledFlowMachineDynamic. -
-", revisions=" -Nrpm
mover.
-This is for
-IBPSA, #1704.
--This package contains validation models for the classes in - -IBPSA.Obsolete.Fluid.Movers.Preconfigured. -
--Note that most validation models contain simple input data -which may not be realistic, but for which the correct -output can be obtained through an analytic solution. -The examples plot various outputs, which have been verified against these -solutions. These model outputs are stored as reference data and -used for continuous validation whenever models in the library change. -
-")); -end Validation; diff --git a/IBPSA/Obsolete/Fluid/Movers/Preconfigured/Validation/package.order b/IBPSA/Obsolete/Fluid/Movers/Preconfigured/Validation/package.order deleted file mode 100644 index 799d7b6441..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/Preconfigured/Validation/package.order +++ /dev/null @@ -1 +0,0 @@ -ControlledFlowMachinePreconfigured diff --git a/IBPSA/Obsolete/Fluid/Movers/Preconfigured/package.mo b/IBPSA/Obsolete/Fluid/Movers/Preconfigured/package.mo deleted file mode 100644 index b0ea06704a..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/Preconfigured/package.mo +++ /dev/null @@ -1,13 +0,0 @@ -within IBPSA.Obsolete.Fluid.Movers; -package Preconfigured "Obsolete preconfigured models" - extends Modelica.Icons.Package; -annotation (preferredView="info", Documentation(info=" --This package contains obsolete preconfigured mover models. -
-"), -Icon(graphics={ Line( - points={{-60,0},{-20,-40},{60,40}}, - color={0,140,72}, - thickness=10)})); -end Preconfigured; diff --git a/IBPSA/Obsolete/Fluid/Movers/Preconfigured/package.order b/IBPSA/Obsolete/Fluid/Movers/Preconfigured/package.order deleted file mode 100644 index c30661570d..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/Preconfigured/package.order +++ /dev/null @@ -1,2 +0,0 @@ -SpeedControlled_Nrpm -Validation diff --git a/IBPSA/Obsolete/Fluid/Movers/SpeedControlled_Nrpm.mo b/IBPSA/Obsolete/Fluid/Movers/SpeedControlled_Nrpm.mo deleted file mode 100644 index 76ac0f30b4..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/SpeedControlled_Nrpm.mo +++ /dev/null @@ -1,197 +0,0 @@ -within IBPSA.Obsolete.Fluid.Movers; -model SpeedControlled_Nrpm - "Fan or pump with ideally controlled speed Nrpm as input signal" - extends IBPSA.Obsolete.Fluid.Movers.BaseClasses.PartialFlowMachine( - final preVar=IBPSA.Fluid.Movers.BaseClasses.Types.PrescribedVariable.Speed, - final nominalValuesDefineDefaultPressureCurve=false, - final computePowerUsingSimilarityLaws=true, - final stageInputs(each final unit="1") = per.speeds, - final constInput(final unit="1") = per.constantSpeed, - filter( - final y_start=y_start, - u(final unit="1"), - y(final unit="1")), - eff( - per(final pressure = per.pressure, - final etaHydMet = per.etaHydMet, - final etaMotMet = per.etaMotMet), - r_N(start=y_start)), - gaiSpe(u(final unit="rev/min"), - final k=1/per.speed_rpm_nominal)); - - parameter Real y_start(min=0, max=1, unit="1")=0 "Initial value of speed" - annotation(Dialog(tab="Dynamics", group="Filtered speed", enable=use_inputFilter)); - - Modelica.Blocks.Interfaces.RealInput Nrpm(final unit="rev/min") - if inputType == IBPSA.Fluid.Types.InputType.Continuous - "Prescribed rotational speed" - annotation (Placement(transformation( - extent={{-20,-20},{20,20}}, - rotation=-90, - origin={0,120}), iconTransformation( - extent={{-20,-20},{20,20}}, - rotation=-90, - origin={0,120}))); - -protected - Modelica.Blocks.Math.Gain gain(final k=-1) "Pressure gain" - annotation (Placement(transformation(extent={{10,-10},{-10,10}}, - rotation=270, - origin={-10,-20}))); -initial equation - assert(per.havePressureCurve, - "SpeedControlled_Nrpm model requires to set the pressure vs. flow rate curve in record 'per'."); - -equation - connect(Nrpm, gaiSpe.u) - annotation (Line(points={{0,120},{0,80},{-2.8,80}}, color={0,0,127})); - connect(gaiSpe.y, inputSwitch.u) annotation (Line(points={{-16.6,80},{-26,80}, - {-26,50},{-22,50}}, color={0,0,127})); - connect(eff.dp, gain.u) annotation (Line(points={{-11,-50},{-6,-50},{-6,-42}, - {-10,-42},{-10,-32}}, - color={0,0,127})); - connect(gain.y, preSou.dp_in) - annotation (Line(points={{-10,-9},{-10,14},{56,14},{56,8}}, - color={0,0,127})); - if use_inputFilter then - connect(filter.y, eff.y_in) annotation (Line(points={{41,70.5},{44,70.5},{44, - 26},{-26,26},{-26,-46}}, color={0,0,127})); - else - connect(inputSwitch.y, eff.y_in) annotation (Line(points={{1,50},{44,50},{44, - 26},{-26,26},{-26,-46}}, - color={0,0,127})); - end if; - annotation (defaultComponentName="mov", - Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, - 100}}), - graphics={ - Text( - extent={{-40,126},{-160,76}}, - textColor={0,0,127}, - visible=inputType == IBPSA.Fluid.Types.InputType.Continuous or inputType == IBPSA.Fluid.Types.InputType.Stages, - textString=DynamicSelect("Nrpm", if inputType == IBPSA.Fluid.Types.InputType.Continuous then String(Nrpm, format=".0f") else String(stage)))}), - obsolete = "Obsolete model - use IBPSA.Fluid.Movers.SpeedControlled_y instead", - Documentation(info=" --This model describes a fan or pump with prescribed speed in revolutions per minute. -The head is computed based on the performance curve that take as an argument -the actual volume flow rate divided by the maximum flow rate and the relative -speed of the fan. -
--See the - -User's Guide for more information. -
-", - revisions=" -m_flow_nominal
.not use_powerCharacteristic
-with the enumeration
-
-IBPSA.Fluid.Movers.BaseClasses.Types.HydraulicEfficiencyMethod.
-This is for
-#2668.
-March 7, 2022, by Michael Wetter:final massDynamics=energyDynamics
.filteredSpeed
to use_inputFilter
.PartialFlowMachine
.
-This is for
-#417.
-speeds=per.speeds
.
-This is for
-#396.
-per
replaceable
-as for the other models.
-Nrpm
mover.
-This is for
-IBPSA, #1704.
--This package contains base classes for obsolete validation models. -
-")); -end BaseClasses; diff --git a/IBPSA/Obsolete/Fluid/Movers/Validation/BaseClasses/package.order b/IBPSA/Obsolete/Fluid/Movers/Validation/BaseClasses/package.order deleted file mode 100644 index e50c2d939c..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/Validation/BaseClasses/package.order +++ /dev/null @@ -1 +0,0 @@ -ControlledFlowMachine diff --git a/IBPSA/Obsolete/Fluid/Movers/Validation/ControlledFlowMachine.mo b/IBPSA/Obsolete/Fluid/Movers/Validation/ControlledFlowMachine.mo deleted file mode 100644 index 2097d009c6..0000000000 --- a/IBPSA/Obsolete/Fluid/Movers/Validation/ControlledFlowMachine.mo +++ /dev/null @@ -1,37 +0,0 @@ -within IBPSA.Obsolete.Fluid.Movers.Validation; -model ControlledFlowMachine "Fans with different control signals as input" - extends Modelica.Icons.Example; - extends IBPSA.Obsolete.Fluid.Movers.Validation.BaseClasses.ControlledFlowMachine( - fan4(addPowerToMedium=false, use_inputFilter=false, - energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial), - fan1(addPowerToMedium=false, - energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial), - fan2(addPowerToMedium=false, use_inputFilter=false, - energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial), - fan3(addPowerToMedium=false, use_inputFilter=false, - energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)); - - annotation ( -experiment(Tolerance=1e-6, StopTime=600), -__Dymola_Commands(file="modelica://IBPSA/Resources/Scripts/Dymola/Obsolete/Fluid/Movers/Validation/ControlledFlowMachine.mos" - "Simulate and plot"), - Documentation(info=" -This example demonstrates the use of the flow model with four different configurations. -At steady-state, all flow models have the same mass flow rate and pressure difference. -Note thataddPowerToMedium=false
since otherwise,
-Dymola computes the enthalpy change of the component as a fraction (k*m_flow+P_internal)/m_flow
-which leads to an error because of 0/0
at zero flow rate.
-", revisions="
-Nrpm
mover.
-This is for
-IBPSA, #1704.
-Nrpm
mover.
-This is for
-IBPSA, #1704.
--This example demonstrates and tests the use of a flow machine whose mass flow rate is reduced to zero. -
--The fans have been configured as steady-state models. -This ensures that the actual speed is equal to the input signal. -
-", revisions=" -