From 3e96e3eca39cbd7afb876f7cfba2448ba7f083b9 Mon Sep 17 00:00:00 2001 From: "fabian.wuellhorst" Date: Wed, 11 May 2022 14:21:52 +0200 Subject: [PATCH] Rename nSet to ySet #1576 --- ...rtialReversibleVapourCompressionMachine.mo | 26 ++++++++-------- IBPSA/Fluid/Chillers/BlackBoxData.mo | 10 +++---- IBPSA/Fluid/Chillers/Examples/Chiller.mo | 2 +- .../PerformanceData/LookUpTable2D.mo | 2 +- .../PerformanceData/LookUpTableND.mo | 2 +- .../PerformanceData/PolynomalApproach.mo | 2 +- .../BlackBoxData/PerformanceData/VCLibMap.mo | 2 +- IBPSA/Fluid/HeatPumps/Controls/AntiFreeze.mo | 2 +- IBPSA/Fluid/HeatPumps/Controls/BaseClasses.mo | 2 +- .../BaseClasses/InverterControlledHP.mo | 2 +- .../HeatPumps/Controls/BaseClasses/OnOffHP.mo | 2 +- .../Controls/BaseClasses/PartialTSetToNSet.mo | 4 +-- .../Controls/BaseClasses/package.order | 2 +- .../HeatPumps/Controls/DefrostControl.mo | 4 +-- .../Fluid/HeatPumps/Controls/OnOffControl.mo | 30 +++++++++---------- .../HeatPumps/Controls/OperationalEnvelope.mo | 2 +- .../Fluid/HeatPumps/Controls/SafetyControl.mo | 14 ++++----- .../Controls/SafetyControls/AntiFreeze.mo | 2 +- .../BaseClasses/PartialSafetyControl.mo | 2 +- .../Controls/SafetyControls/DefrostControl.mo | 4 +-- .../Controls/SafetyControls/OnOffControl.mo | 30 +++++++++---------- .../SafetyControls/OperationalEnvelope.mo | 2 +- .../Controls/SafetyControls/SafetyControl.mo | 14 ++++----- IBPSA/Fluid/HeatPumps/Examples/HeatPump.mo | 4 +-- .../HeatPumps/SafetyControls/AntiFreeze.mo | 2 +- .../HeatPumps/SafetyControls/BaseClasses.mo | 2 +- .../SafetyControls/DefrostControl.mo | 2 +- .../HeatPumps/SafetyControls/OnOffControl.mo | 30 +++++++++---------- .../SafetyControls/OperationalEnvelope.mo | 2 +- .../HeatPumps/SafetyControls/SafetyControl.mo | 14 ++++----- 30 files changed, 110 insertions(+), 110 deletions(-) diff --git a/IBPSA/Fluid/BaseClasses/PartialReversibleVapourCompressionMachine.mo b/IBPSA/Fluid/BaseClasses/PartialReversibleVapourCompressionMachine.mo index 0386f168b2..b6afcd4032 100644 --- a/IBPSA/Fluid/BaseClasses/PartialReversibleVapourCompressionMachine.mo +++ b/IBPSA/Fluid/BaseClasses/PartialReversibleVapourCompressionMachine.mo @@ -43,7 +43,7 @@ partial model PartialReversibleVapourCompressionMachine enable=use_refIne, group="Refrigerant inertia"), Evaluate=true); parameter Integer nthOrder=3 "Order of refrigerant cycle interia" annotation (Dialog(enable= use_refIne, group="Refrigerant inertia")); - parameter Boolean useBusConnectorOnly = false "Set true to use bus connector for modeSet, nSet and iceFac input" + parameter Boolean useBusConnectorOnly = false "Set true to use bus connector for modeSet, ySet and iceFac input" annotation(choices(checkBox=true), Dialog(group="Input Connectors")); //Condenser @@ -281,9 +281,9 @@ partial model PartialReversibleVapourCompressionMachine extent={{6,6},{-6,-6}}, rotation=90, origin={-14,-52}))); - Modelica.Blocks.Routing.RealPassThrough realPassThroughnSetCon + Modelica.Blocks.Routing.RealPassThrough realPassThroughySetCon if not use_refIne - "Use default nSet value" annotation (Placement(transformation( + "Use default ySet value" annotation (Placement(transformation( extent={{-6,-6},{6,6}}, rotation=90, origin={16,58}))); @@ -300,8 +300,8 @@ partial model PartialReversibleVapourCompressionMachine extent={{-6,-6},{6,6}}, rotation=90, origin={-16,58}))); - Modelica.Blocks.Routing.RealPassThrough realPassThroughnSetEva if not use_refIne - "Use default nSet value" annotation (Placement(transformation( + Modelica.Blocks.Routing.RealPassThrough realPassThroughySetEva if not use_refIne + "Use default ySet value" annotation (Placement(transformation( extent={{6,-6},{-6,6}}, rotation=90, origin={16,-52}))); @@ -323,7 +323,7 @@ partial model PartialReversibleVapourCompressionMachine rotation=0, origin={-52,114}))); - Modelica.Blocks.Interfaces.RealInput nSet if not useBusConnectorOnly + Modelica.Blocks.Interfaces.RealInput ySet if not useBusConnectorOnly "Input signal speed for compressor relative between 0 and 1" annotation (Placement( transformation(extent={{-132,4},{-100,36}}))); Interfaces.VapourCompressionMachineControlBus sigBus annotation ( @@ -426,7 +426,7 @@ partial model PartialReversibleVapourCompressionMachine Modelica.Blocks.Logical.Hysteresis hysteresis( final uLow=Modelica.Constants.eps, final uHigh=ySet_small, - final pre_y_start=false) "Use default nSet value" annotation (Placement( + final pre_y_start=false) "Use default ySet value" annotation (Placement( transformation( extent={{6,-6},{-6,6}}, rotation=180, @@ -509,7 +509,7 @@ equation extent={{-3,-6},{-3,-6}}, horizontalAlignment=TextAlignment.Right)); - connect(innerCycle.QEva, realPassThroughnSetEva.u) annotation (Line( + connect(innerCycle.QEva, realPassThroughySetEva.u) annotation (Line( points={{-1.77636e-15,-30.7},{-1.77636e-15,-38},{16,-38},{16,-44.8}}, color={0,0,127}, pattern=LinePattern.Dash)); @@ -521,7 +521,7 @@ equation points={{1.77636e-15,28.7},{1.77636e-15,30},{0,30},{0,40},{-16,40},{-16,50.8}}, color={0,0,127}, pattern=LinePattern.Dash)); - connect(innerCycle.QCon, realPassThroughnSetCon.u) annotation (Line( + connect(innerCycle.QCon, realPassThroughySetCon.u) annotation (Line( points={{1.77636e-15,28.7},{0,28.7},{0,40},{16,40},{16,50.8}}, color={0,0,127}, pattern=LinePattern.Dash)); @@ -545,7 +545,7 @@ equation index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); - connect(nSet,sigBus.nSet) annotation (Line(points={{-116,20},{-76,20},{-76,-43}, + connect(ySet,sigBus.ySet) annotation (Line(points={{-116,20},{-76,20},{-76,-43}, {-105,-43}}, color={0,0,127}), Text( string="%second", index=1, @@ -575,7 +575,7 @@ equation pattern=LinePattern.Dash)); connect(port_b2, port_b2) annotation (Line(points={{-100,-60},{-100,-60},{-100, -60}}, color={0,127,255})); - connect(realPassThroughnSetCon.y, con.QFlow_in) annotation (Line( + connect(realPassThroughySetCon.y, con.QFlow_in) annotation (Line( points={{16,64.6},{16,77.04},{0,77.04}}, color={0,0,127}, pattern=LinePattern.Dash)); @@ -583,7 +583,7 @@ equation points={{-16,64.6},{-16,77.04},{0,77.04}}, color={0,0,127}, pattern=LinePattern.Dash)); - connect(realPassThroughnSetEva.y, eva.QFlow_in) annotation (Line(points={{16,-58.6}, + connect(realPassThroughySetEva.y, eva.QFlow_in) annotation (Line(points={{16,-58.6}, {16,-69.04},{0,-69.04}}, color={0,0,127})); connect(heatFlowIneEva.y, eva.QFlow_in) annotation (Line(points={{-14,-58.6},{ -14,-69.04},{0,-69.04}}, color={0,0,127})); @@ -631,7 +631,7 @@ equation index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); - connect(hysteresis.u, sigBus.nSet) annotation (Line(points={{-73.2,-28},{-76,-28}, + connect(hysteresis.u, sigBus.ySet) annotation (Line(points={{-73.2,-28},{-76,-28}, {-76,-43},{-105,-43}}, color={0,0,127}), Text( string="%second", index=1, diff --git a/IBPSA/Fluid/Chillers/BlackBoxData.mo b/IBPSA/Fluid/Chillers/BlackBoxData.mo index c48aa03d39..096744bf1d 100644 --- a/IBPSA/Fluid/Chillers/BlackBoxData.mo +++ b/IBPSA/Fluid/Chillers/BlackBoxData.mo @@ -261,7 +261,7 @@ package BlackBoxData "Collection of Chiller Database Records" -30},{0,-110}}, color={0,0,127})); connect(realCorr.y, nTimesSF.u2) annotation (Line(points={{-13,39.7},{-13, 31.4},{-13.2,31.4}}, color={0,0,127})); - connect(sigBus.nSet, nTimesSF.u1) annotation (Line( + connect(sigBus.ySet, nTimesSF.u1) annotation (Line( points={{1,104},{-4,104},{-4,31.4},{-4.8,31.4}}, color={255,204,51}, thickness=0.5), Text( @@ -513,7 +513,7 @@ package BlackBoxData "Collection of Chiller Database Records" string="%first", index=-1, extent={{-6,3},{-6,3}})); - connect(sigBus.nSet, greaterThreshold.u) annotation (Line( + connect(sigBus.ySet, greaterThreshold.u) annotation (Line( points={{1,104},{-72,104},{-72,71.2}}, color={255,204,51}, thickness=0.5), Text( @@ -526,7 +526,7 @@ package BlackBoxData "Collection of Chiller Database Records" connect(greaterThreshold.y, switchPel.u2) annotation (Line(points={{-72,57.4}, {-72,-18},{38,-18},{38,-34},{50,-34},{50,-48}}, color={255,0,255})); - connect(sigBus.nSet, nConGain.u) annotation (Line( + connect(sigBus.ySet, nConGain.u) annotation (Line( points={{1,104},{1.77636e-15,104},{1.77636e-15,95.6}}, color={255,204,51}, thickness=0.5), Text( @@ -659,12 +659,12 @@ package BlackBoxData "Collection of Chiller Database Records" Real Char[2]; equation Char =PolyData( - sigBus.nSet, + sigBus.ySet, sigBus.TEvaOutMea, sigBus.TConInMea, sigBus.m_flowEvaMea, sigBus.m_flowConMea); - if sigBus.nSet > Modelica.Constants.eps then + if sigBus.ySet > Modelica.Constants.eps then //Get's the data from the signal Bus and calculates the power and heat flow based on the function one chooses. QEva = Char[2]; Pel = Char[1]; diff --git a/IBPSA/Fluid/Chillers/Examples/Chiller.mo b/IBPSA/Fluid/Chillers/Examples/Chiller.mo index 57e5cddb59..87bca13824 100644 --- a/IBPSA/Fluid/Chillers/Examples/Chiller.mo +++ b/IBPSA/Fluid/Chillers/Examples/Chiller.mo @@ -178,7 +178,7 @@ equation points={{64,-38},{78,-38}}, color={0,127,255})); connect(senTAct.port_b, Room.ports[2]) annotation (Line(points={{64,-38},{66,-38}, {66,1},{76,1}}, color={0,127,255})); - connect(chiller.nSet, booleanToReal.y) annotation (Line(points={{-2.83333, + connect(chiller.ySet, booleanToReal.y) annotation (Line(points={{-2.83333, -26.84},{-3,-26.84},{-3,-45.3}}, color={0,0,127})); connect(sinkSideMassFlowSource.ports[1], chiller.port_a1) annotation (Line( points={{-34,-48},{-12.5,-48},{-12.5,-23}}, color={0,127,255})); diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/LookUpTable2D.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/LookUpTable2D.mo index ffc00c49ec..496628e418 100644 --- a/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/LookUpTable2D.mo +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/LookUpTable2D.mo @@ -102,7 +102,7 @@ equation -80},{0,-110}}, color={0,0,127})); connect(realCorr.y, nTimesSF.u2) annotation (Line(points={{-15,39.7},{-15, 31.4},{-15.2,31.4}}, color={0,0,127})); - connect(sigBus.nSet, nTimesSF.u1) annotation (Line( + connect(sigBus.ySet, nTimesSF.u1) annotation (Line( points={{1,104},{-2,104},{-2,31.4},{-6.8,31.4}}, color={255,204,51}, thickness=0.5), Text( diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/LookUpTableND.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/LookUpTableND.mo index 2db463841b..f83ba4e51c 100644 --- a/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/LookUpTableND.mo +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/LookUpTableND.mo @@ -143,7 +143,7 @@ equation string="%first", index=-1, extent={{-6,3},{-6,3}})); - connect(sigBus.nSet, nConGain.u) annotation (Line( + connect(sigBus.ySet, nConGain.u) annotation (Line( points={{1,104},{-22,104},{-22,84.8}}, color={255,204,51}, thickness=0.5), Text( diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/PolynomalApproach.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/PolynomalApproach.mo index 1c5ac1d646..44d51d3af5 100644 --- a/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/PolynomalApproach.mo +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/PolynomalApproach.mo @@ -101,7 +101,7 @@ equation index=1, extent={{6,3},{6,3}}, horizontalAlignment=TextAlignment.Left)); - connect(passThroughYSet.u, sigBus.nSet) annotation (Line(points={{-34,81.2},{-34, + connect(passThroughYSet.u, sigBus.ySet) annotation (Line(points={{-34,81.2},{-34, 104},{1,104}}, color={0,0,127}), Text( string="%second", index=1, diff --git a/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/VCLibMap.mo b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/VCLibMap.mo index 83cf07db6f..a350ff3b64 100644 --- a/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/VCLibMap.mo +++ b/IBPSA/Fluid/HeatPumps/BlackBoxData/PerformanceData/VCLibMap.mo @@ -165,7 +165,7 @@ equation 36},{50,39}}, color={0,0,127})); connect(const_minCOP.y, max.u2) annotation (Line(points={{5,39.5},{5,36},{27.6, 36},{27.6,32.8}}, color={0,0,127})); - connect(multiplex3_1.u1[1], sigBus.nSet) annotation (Line(points={{4.2,85.2}, + connect(multiplex3_1.u1[1], sigBus.ySet) annotation (Line(points={{4.2,85.2}, {4.2,90},{14,90},{14,104},{1,104}}, color={0,0,127}), Text( string="%second", index=1, diff --git a/IBPSA/Fluid/HeatPumps/Controls/AntiFreeze.mo b/IBPSA/Fluid/HeatPumps/Controls/AntiFreeze.mo index 3f7a62d9b1..1356b41c72 100644 --- a/IBPSA/Fluid/HeatPumps/Controls/AntiFreeze.mo +++ b/IBPSA/Fluid/HeatPumps/Controls/AntiFreeze.mo @@ -23,7 +23,7 @@ model AntiFreeze "Model to prevent source from freezing" annotation (Placement(transformation(extent={{-104,-24},{-84,-4}}))); equation - connect(nSet,swiErr.u1) annotation (Line(points={{-136,20},{32,20},{32,8},{84, + connect(ySet,swiErr.u1) annotation (Line(points={{-136,20},{32,20},{32,8},{84, 8}}, color={0,0,127})); connect(booConAntFre.y, swiErr.u2) annotation (Line( points={{16.7,-29},{16.7,-28},{42,-28},{42,0},{84,0}}, diff --git a/IBPSA/Fluid/HeatPumps/Controls/BaseClasses.mo b/IBPSA/Fluid/HeatPumps/Controls/BaseClasses.mo index 924e8ff0c9..c605b54f89 100644 --- a/IBPSA/Fluid/HeatPumps/Controls/BaseClasses.mo +++ b/IBPSA/Fluid/HeatPumps/Controls/BaseClasses.mo @@ -175,7 +175,7 @@ For the boundaries of the y-input value, a dynamic hysteresis is used to ensure end BoundaryMapIcon; partial block PartialSafetyControl "Base Block" - Modelica.Blocks.Interfaces.RealInput nSet + Modelica.Blocks.Interfaces.RealInput ySet "Set value relative speed of compressor. Analog from 0 to 1" annotation (Placement(transformation(extent={{-152,4},{-120,36}}))); Modelica.Blocks.Interfaces.RealOutput nOut diff --git a/IBPSA/Fluid/HeatPumps/Controls/BaseClasses/InverterControlledHP.mo b/IBPSA/Fluid/HeatPumps/Controls/BaseClasses/InverterControlledHP.mo index 0902bd2d48..e1aede6d10 100644 --- a/IBPSA/Fluid/HeatPumps/Controls/BaseClasses/InverterControlledHP.mo +++ b/IBPSA/Fluid/HeatPumps/Controls/BaseClasses/InverterControlledHP.mo @@ -1,6 +1,6 @@ within IBPSA.Fluid.HeatPumps.Controls.BaseClasses; model InverterControlledHP "Converter model for an inverter / speed controlled HP modulating between 0 and 1" - extends PartialTSetToNSet; + extends PartialTSetToYSet; parameter Real hys "Hysteresis of controller"; Modelica.Blocks.Logical.OnOffController onOffController(bandwidth=hys, pre_y_start=false) "Hysteresis controller for set temperature" diff --git a/IBPSA/Fluid/HeatPumps/Controls/BaseClasses/OnOffHP.mo b/IBPSA/Fluid/HeatPumps/Controls/BaseClasses/OnOffHP.mo index 990717410c..e5507aee00 100644 --- a/IBPSA/Fluid/HeatPumps/Controls/BaseClasses/OnOffHP.mo +++ b/IBPSA/Fluid/HeatPumps/Controls/BaseClasses/OnOffHP.mo @@ -1,6 +1,6 @@ within IBPSA.Fluid.HeatPumps.Controls.BaseClasses; model OnOffHP "Controller gives full speed or stop signal depending on temperature hysteresis" - extends IBPSA.Fluid.HeatPumps.Controls.BaseClasses.PartialTSetToNSet; + extends IBPSA.Fluid.HeatPumps.Controls.BaseClasses.PartialTSetToYSet; parameter Real hys "Hysteresis of controller"; Modelica.Blocks.Logical.OnOffController onOffController(bandwidth=hys, pre_y_start=false) "Hysteresis controller for set temperature" annotation (Placement(transformation(extent={{-54,10},{-26,38}}))); diff --git a/IBPSA/Fluid/HeatPumps/Controls/BaseClasses/PartialTSetToNSet.mo b/IBPSA/Fluid/HeatPumps/Controls/BaseClasses/PartialTSetToNSet.mo index ebaf355232..15b347860a 100644 --- a/IBPSA/Fluid/HeatPumps/Controls/BaseClasses/PartialTSetToNSet.mo +++ b/IBPSA/Fluid/HeatPumps/Controls/BaseClasses/PartialTSetToNSet.mo @@ -1,5 +1,5 @@ within IBPSA.Fluid.HeatPumps.Controls.BaseClasses; -partial model PartialTSetToNSet +partial model PartialTSetToYSet "Partial model to convert set temperature to compressor speed of heat pump" parameter Boolean use_secHeaGen=false "True to choose a bivalent system" annotation(choices(checkBox=true)); @@ -101,4 +101,4 @@ equation ")); -end PartialTSetToNSet; +end PartialTSetToYSet; diff --git a/IBPSA/Fluid/HeatPumps/Controls/BaseClasses/package.order b/IBPSA/Fluid/HeatPumps/Controls/BaseClasses/package.order index 512aff2f8b..f6521a2151 100644 --- a/IBPSA/Fluid/HeatPumps/Controls/BaseClasses/package.order +++ b/IBPSA/Fluid/HeatPumps/Controls/BaseClasses/package.order @@ -1,4 +1,4 @@ InverterControlledHP OnOffHP PartialHPController -PartialTSetToNSet +PartialTSetToYSet diff --git a/IBPSA/Fluid/HeatPumps/Controls/DefrostControl.mo b/IBPSA/Fluid/HeatPumps/Controls/DefrostControl.mo index 6801a6d00c..f88a05ecb0 100644 --- a/IBPSA/Fluid/HeatPumps/Controls/DefrostControl.mo +++ b/IBPSA/Fluid/HeatPumps/Controls/DefrostControl.mo @@ -37,7 +37,7 @@ block DefrostControl origin={10,52}))); Modelica.Blocks.Interfaces.BooleanInput modeSet "Set value of HP mode" annotation (Placement(transformation(extent={{-132,-36},{-100,-4}}))); - Modelica.Blocks.Interfaces.RealInput nSet + Modelica.Blocks.Interfaces.RealInput ySet "Set value relative speed of compressor. Analog from 0 to 1" annotation (Placement(transformation(extent={{-132,4},{-100,36}}))); IBPSA.Utilities.Logical.SmoothSwitch swiErr @@ -89,7 +89,7 @@ equation {56,4}}, color={0,0,127})); connect(swiErr.y, nOut) annotation (Line(points={{79,12},{96,12},{96,20},{110, 20}}, color={0,0,127})); - connect(nSet, swiErr.u1) annotation (Line(points={{-116,20},{56,20}}, + connect(ySet, swiErr.u1) annotation (Line(points={{-116,20},{56,20}}, color={0,0,127})); connect(sigBusHP.iceFacMea, iceFacGreMinHea.u) annotation (Line( points={{-105.93,-61.93},{-68,-61.93},{-68,-78},{-40.6,-78}}, diff --git a/IBPSA/Fluid/HeatPumps/Controls/OnOffControl.mo b/IBPSA/Fluid/HeatPumps/Controls/OnOffControl.mo index 9be7f88ca4..3d0bd201e7 100644 --- a/IBPSA/Fluid/HeatPumps/Controls/OnOffControl.mo +++ b/IBPSA/Fluid/HeatPumps/Controls/OnOffControl.mo @@ -15,7 +15,7 @@ model OnOffControl annotation (Dialog(enable=use_runPerHou)); parameter Boolean pre_n_start=true "Start value of pre(n) at initial time"; Modelica.Blocks.Logical.GreaterThreshold - nSetGreaterZero(final threshold=Modelica.Constants.eps) + ySetGreaterZero(final threshold=Modelica.Constants.eps) "True if device is set on" annotation (Placement(transformation(extent={{-110,56},{-94,72}}))); Modelica.Blocks.Logical.And andRun @@ -56,7 +56,7 @@ model OnOffControl Modelica.Blocks.Logical.And andIsOn "Check if both set and actual value are greater zero" annotation (Placement(transformation(extent={{16,12},{28,24}}))); - Modelica.Blocks.Interfaces.RealInput nSet + Modelica.Blocks.Interfaces.RealInput ySet "Set value relative speed of compressor. Analog from 0 to 1" annotation (Placement(transformation(extent={{-152,-16},{-120,16}}))); Modelica.Blocks.Interfaces.RealOutput nOut @@ -64,11 +64,11 @@ model OnOffControl annotation (Placement(transformation(extent={{120,-10},{140,10}}))); IBPSA.Controls.Interfaces.VapourCompressionMachineControlBus sigBusHP annotation (Placement(transformation(extent={{-152,-84},{-118,-54}}))); - IBPSA.Utilities.Logical.SmoothSwitch swinOutnSet - "If any of the ornSet conditions is true, nSet will be passed. Else nOut will stay the same" + IBPSA.Utilities.Logical.SmoothSwitch swinOutySet + "If any of the orySet conditions is true, ySet will be passed. Else nOut will stay the same" annotation (Placement(transformation(extent={{90,-10},{110,10}}))); Modelica.Blocks.MathBoolean.Or orSetN(nu=4) - "Output is true if nSet value is correct" + "Output is true if ySet value is correct" annotation (Placement(transformation(extent={{52,-10},{72,10}}))); Modelica.Blocks.Logical.And andIsOff "Check if both set and actual value are equal to zero" @@ -102,25 +102,25 @@ equation color={255,0,255}, pattern=LinePattern.Dash)); - connect(nSet,nSetGreaterZero. u) annotation (Line(points={{-136,0},{-120,0},{-120, + connect(ySet,ySetGreaterZero. u) annotation (Line(points={{-136,0},{-120,0},{-120, 64},{-111.6,64}}, color={0,0,127})); - connect(nSetGreaterZero.y, notSetOn.u) annotation (Line(points={{-93.2,64},{-78, + connect(ySetGreaterZero.y, notSetOn.u) annotation (Line(points={{-93.2,64},{-78, 64},{-78,77},{-67,77}}, color={255,0,255})); connect(pre1.y, andIsOn.u2) annotation (Line(points={{-71.4,-42},{-71.4,12},{-72, 12},{-72,14},{-42,14},{-42,13.2},{14.8,13.2}}, color={255,0,255})); - connect(nSetGreaterZero.y, andIsOn.u1) annotation (Line(points={{-93.2,64},{-86, + connect(ySetGreaterZero.y, andIsOn.u1) annotation (Line(points={{-93.2,64},{-86, 64},{-86,18},{14.8,18}}, color={255,0,255})); connect(nOut, nOut) annotation (Line(points={{130,0},{130,0}}, color={0,0,127})); - connect(swinOutnSet.y, nOut) + connect(swinOutySet.y, nOut) annotation (Line(points={{111,0},{130,0}}, color={0,0,127})); - connect(nSet, swinOutnSet.u1) annotation (Line(points={{-136,0},{-120,0},{ + connect(ySet, swinOutySet.u1) annotation (Line(points={{-136,0},{-120,0},{ -120,98},{78,98},{78,8},{88,8}}, color={0,0,127})); connect(andTurnOff.y, andRun.u1) annotation (Line(points={{0.6,86},{8,86},{8,78}, {16.8,78}}, color={255,0,255})); - connect(orSetN.y, swinOutnSet.u2) + connect(orSetN.y, swinOutySet.u2) annotation (Line(points={{73.5,0},{88,0}}, color={255,0,255})); connect(notSetOn.y, andIsOff.u1) annotation (Line(points={{-55.5,77},{-50,77}, {-50,42},{16,42},{16,38},{14.8,38}}, color={255,0,255})); @@ -143,13 +143,13 @@ equation {-50,81.2},{-13.2,81.2}}, color={255,0,255})); connect(pre1.y, andTurnOff.u1) annotation (Line(points={{-71.4,-42},{-72,-42}, {-72,86},{-13.2,86}}, color={255,0,255})); - connect(nSetGreaterZero.y, andTurnOn.u2) annotation (Line(points={{-93.2,64},{ + connect(ySetGreaterZero.y, andTurnOn.u2) annotation (Line(points={{-93.2,64},{ -86,64},{-86,-98},{24,-98},{24,-88.8},{26.8,-88.8}}, color={255,0,255})); connect(notIsOn.y, andTurnOn.u1) annotation (Line(points={{-57.6,-18},{-56,-18}, {-56,-96},{22,-96},{22,-84},{26.8,-84}}, color={255,0,255})); connect(notIsOn.y, andIsOff.u2) annotation (Line(points={{-57.6,-18},{-56,-18}, {-56,33.2},{14.8,33.2}}, color={255,0,255})); - connect(sigBusHP.nSet, swinOutnSet.u3) annotation (Line( + connect(sigBusHP.ySet, swinOutySet.u3) annotation (Line( points={{-134.915,-68.925},{-134.915,-104},{78,-104},{78,-8},{88,-8}}, color={255,204,51}, thickness=0.5), Text( @@ -168,11 +168,11 @@ equation extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); annotation (Documentation(info="

- Checks if the nSet value is legal by checking if the device can + Checks if the ySet value is legal by checking if the device can either be turned on or off, depending on which state it was in.

- E.g. If it is turned on, and the new nSet value is 0, it will only + E.g. If it is turned on, and the new ySet value is 0, it will only turn off if current runtime is longer than the minimal runtime. Else it will keep the current rotating speed.

diff --git a/IBPSA/Fluid/HeatPumps/Controls/OperationalEnvelope.mo b/IBPSA/Fluid/HeatPumps/Controls/OperationalEnvelope.mo index 4700b16d72..4d655659d2 100644 --- a/IBPSA/Fluid/HeatPumps/Controls/OperationalEnvelope.mo +++ b/IBPSA/Fluid/HeatPumps/Controls/OperationalEnvelope.mo @@ -30,7 +30,7 @@ block OperationalEnvelope equation connect(boundaryMap.noErr, swiErr.u2) annotation (Line(points={{-1.1,-3},{42, -3},{42,0},{84,0}}, color={255,0,255})); - connect(nSet,swiErr.u1) annotation (Line(points={{-136,20},{32,20},{32,8}, + connect(ySet,swiErr.u1) annotation (Line(points={{-136,20},{32,20},{32,8}, {84,8}},color={0,0,127})); connect(booConOpeEnv.y, swiErr.u2) annotation (Line( points={{24.7,-29},{24.7,-28},{42,-28},{42,0},{84,0}}, diff --git a/IBPSA/Fluid/HeatPumps/Controls/SafetyControl.mo b/IBPSA/Fluid/HeatPumps/Controls/SafetyControl.mo index 685e847f35..f7fc1f71b0 100644 --- a/IBPSA/Fluid/HeatPumps/Controls/SafetyControl.mo +++ b/IBPSA/Fluid/HeatPumps/Controls/SafetyControl.mo @@ -82,7 +82,7 @@ block SafetyControl "Block including all safety levels" annotation (Placement(transformation(extent={{-92,32},{-76,48}})), choicesAllMatching=true); Modelica.Blocks.Sources.BooleanConstant conTru(final k=true) - "Always true as the two blocks OperationalEnvelope and OnOffControl deal with whether the nSet value is correct or not" + "Always true as the two blocks OperationalEnvelope and OnOffControl deal with whether the ySet value is correct or not" annotation (Placement(transformation(extent={{58,-6},{70,6}}))); Modelica.Blocks.Interfaces.RealOutput Pel_deFro if not use_chiller and use_deFro @@ -113,7 +113,7 @@ block SafetyControl "Block including all safety levels" equation connect(conTru.y,swiErr.u2) annotation (Line(points={{70.6,0},{84,0}}, color={255,0,255})); - connect(onOffController.nOut, operationalEnvelope.nSet) annotation (Line( + connect(onOffController.nOut, operationalEnvelope.ySet) annotation (Line( points={{-24.5,1.63636},{-24,1.63636},{-24,3.2},{-11.6,3.2}}, color= {0,0,127})); @@ -141,15 +141,15 @@ equation index=-1, extent={{-3,-6},{-3,-6}}, horizontalAlignment=TextAlignment.Right)); - connect(nSet, defrostControl.nSet) annotation (Line( + connect(ySet, defrostControl.ySet) annotation (Line( points={{-136,20},{-124,20},{-124,4},{-114.88,4}}, color={0,0,127}, pattern=LinePattern.Dash)); - connect(nSet, realPasThrDef.u) annotation (Line( + connect(ySet, realPasThrDef.u) annotation (Line( points={{-136,20},{-116,20},{-116,40},{-93.6,40}}, color={0,0,127}, pattern=LinePattern.Dash)); - connect(realPasThrDef.y, onOffController.nSet) annotation (Line( + connect(realPasThrDef.y, onOffController.ySet) annotation (Line( points={{-75.2,40},{-60,40},{-60,1.63636},{-64.4,1.63636}}, color={0,0,127}, pattern=LinePattern.Dash)); @@ -157,7 +157,7 @@ equation points={{-136,-20},{-120,-20},{-120,-2.66667},{-114.88,-2.66667}}, color={255,0,255}, pattern=LinePattern.Dash)); - connect(defrostControl.nOut, onOffController.nSet) annotation (Line( + connect(defrostControl.nOut, onOffController.ySet) annotation (Line( points={{-74.2,4},{-74.2,1.63636},{-64.4,1.63636}}, color={0,0,127}, pattern=LinePattern.Dash)); @@ -179,7 +179,7 @@ equation points={{-94,19},{-94,28},{-54,28},{-54,80},{130,80}}, color={0,0,127}, pattern=LinePattern.Dash)); - connect(antiFreeze.nSet, operationalEnvelope.nOut) + connect(antiFreeze.ySet, operationalEnvelope.nOut) annotation (Line(points={{22.4,4},{18,4},{18,3.2},{15,3.2}}, color={0,0,127})); connect(antiFreeze.modeSet, operationalEnvelope.modeOut) diff --git a/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/AntiFreeze.mo b/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/AntiFreeze.mo index e147a8082e..fc42983696 100644 --- a/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/AntiFreeze.mo +++ b/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/AntiFreeze.mo @@ -23,7 +23,7 @@ model AntiFreeze "Model to prevent source from freezing" annotation (Placement(transformation(extent={{-104,-24},{-84,-4}}))); equation - connect(nSet,swiErr.u1) annotation (Line(points={{-136,20},{32,20},{32,8},{84, + connect(ySet,swiErr.u1) annotation (Line(points={{-136,20},{32,20},{32,8},{84, 8}}, color={0,0,127})); connect(booConAntFre.y, swiErr.u2) annotation (Line( points={{16.7,-29},{16.7,-28},{42,-28},{42,0},{84,0}}, diff --git a/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/BaseClasses/PartialSafetyControl.mo b/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/BaseClasses/PartialSafetyControl.mo index 186486793e..eac6853329 100644 --- a/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/BaseClasses/PartialSafetyControl.mo +++ b/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/BaseClasses/PartialSafetyControl.mo @@ -1,6 +1,6 @@ within IBPSA.Fluid.HeatPumps.Controls.SafetyControls.BaseClasses; partial block PartialSafetyControl "Base Block" - Modelica.Blocks.Interfaces.RealInput nSet + Modelica.Blocks.Interfaces.RealInput ySet "Set value relative speed of compressor. Analog from 0 to 1" annotation (Placement(transformation(extent={{-152,4},{-120,36}}))); Modelica.Blocks.Interfaces.RealOutput nOut diff --git a/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/DefrostControl.mo b/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/DefrostControl.mo index 8216249120..76bb8bd9c7 100644 --- a/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/DefrostControl.mo +++ b/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/DefrostControl.mo @@ -37,7 +37,7 @@ block DefrostControl origin={10,52}))); Modelica.Blocks.Interfaces.BooleanInput modeSet "Set value of HP mode" annotation (Placement(transformation(extent={{-132,-36},{-100,-4}}))); - Modelica.Blocks.Interfaces.RealInput nSet + Modelica.Blocks.Interfaces.RealInput ySet "Set value relative speed of compressor. Analog from 0 to 1" annotation (Placement(transformation(extent={{-132,4},{-100,36}}))); IBPSA.Utilities.Logical.SmoothSwitch swiErr @@ -89,7 +89,7 @@ equation {56,4}}, color={0,0,127})); connect(swiErr.y, nOut) annotation (Line(points={{79,12},{96,12},{96,20},{110, 20}}, color={0,0,127})); - connect(nSet, swiErr.u1) annotation (Line(points={{-116,20},{56,20}}, + connect(ySet, swiErr.u1) annotation (Line(points={{-116,20},{56,20}}, color={0,0,127})); connect(sigBusHP.iceFacMea, iceFacGreMinHea.u) annotation (Line( points={{-105.93,-61.93},{-68,-61.93},{-68,-78},{-40.6,-78}}, diff --git a/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/OnOffControl.mo b/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/OnOffControl.mo index 47e1da1c6d..d1264c02f6 100644 --- a/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/OnOffControl.mo +++ b/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/OnOffControl.mo @@ -15,7 +15,7 @@ model OnOffControl annotation (Dialog(enable=use_runPerHou)); parameter Boolean pre_n_start=true "Start value of pre(n) at initial time"; Modelica.Blocks.Logical.GreaterThreshold - nSetGreaterZero(final threshold=Modelica.Constants.eps) + ySetGreaterZero(final threshold=Modelica.Constants.eps) "True if device is set on" annotation (Placement(transformation(extent={{-110,56},{-94,72}}))); Modelica.Blocks.Logical.And andRun @@ -56,7 +56,7 @@ model OnOffControl Modelica.Blocks.Logical.And andIsOn "Check if both set and actual value are greater zero" annotation (Placement(transformation(extent={{16,12},{28,24}}))); - Modelica.Blocks.Interfaces.RealInput nSet + Modelica.Blocks.Interfaces.RealInput ySet "Set value relative speed of compressor. Analog from 0 to 1" annotation (Placement(transformation(extent={{-152,-16},{-120,16}}))); Modelica.Blocks.Interfaces.RealOutput nOut @@ -64,11 +64,11 @@ model OnOffControl annotation (Placement(transformation(extent={{120,-10},{140,10}}))); IBPSA.Controls.Interfaces.VapourCompressionMachineControlBus sigBusHP annotation (Placement(transformation(extent={{-152,-84},{-118,-54}}))); - IBPSA.Utilities.Logical.SmoothSwitch swinOutnSet - "If any of the ornSet conditions is true, nSet will be passed. Else nOut will stay the same" + IBPSA.Utilities.Logical.SmoothSwitch swinOutySet + "If any of the orySet conditions is true, ySet will be passed. Else nOut will stay the same" annotation (Placement(transformation(extent={{90,-10},{110,10}}))); Modelica.Blocks.MathBoolean.Or orSetN(nu=4) - "Output is true if nSet value is correct" + "Output is true if ySet value is correct" annotation (Placement(transformation(extent={{52,-10},{72,10}}))); Modelica.Blocks.Logical.And andIsOff "Check if both set and actual value are equal to zero" @@ -102,25 +102,25 @@ equation color={255,0,255}, pattern=LinePattern.Dash)); - connect(nSet,nSetGreaterZero. u) annotation (Line(points={{-136,0},{-120,0},{-120, + connect(ySet,ySetGreaterZero. u) annotation (Line(points={{-136,0},{-120,0},{-120, 64},{-111.6,64}}, color={0,0,127})); - connect(nSetGreaterZero.y, notSetOn.u) annotation (Line(points={{-93.2,64},{-78, + connect(ySetGreaterZero.y, notSetOn.u) annotation (Line(points={{-93.2,64},{-78, 64},{-78,77},{-67,77}}, color={255,0,255})); connect(pre1.y, andIsOn.u2) annotation (Line(points={{-71.4,-42},{-71.4,12},{-72, 12},{-72,14},{-42,14},{-42,13.2},{14.8,13.2}}, color={255,0,255})); - connect(nSetGreaterZero.y, andIsOn.u1) annotation (Line(points={{-93.2,64},{-86, + connect(ySetGreaterZero.y, andIsOn.u1) annotation (Line(points={{-93.2,64},{-86, 64},{-86,18},{14.8,18}}, color={255,0,255})); connect(nOut, nOut) annotation (Line(points={{130,0},{130,0}}, color={0,0,127})); - connect(swinOutnSet.y, nOut) + connect(swinOutySet.y, nOut) annotation (Line(points={{111,0},{130,0}}, color={0,0,127})); - connect(nSet, swinOutnSet.u1) annotation (Line(points={{-136,0},{-120,0},{ + connect(ySet, swinOutySet.u1) annotation (Line(points={{-136,0},{-120,0},{ -120,98},{78,98},{78,8},{88,8}}, color={0,0,127})); connect(andTurnOff.y, andRun.u1) annotation (Line(points={{0.6,86},{8,86},{8,78}, {16.8,78}}, color={255,0,255})); - connect(orSetN.y, swinOutnSet.u2) + connect(orSetN.y, swinOutySet.u2) annotation (Line(points={{73.5,0},{88,0}}, color={255,0,255})); connect(notSetOn.y, andIsOff.u1) annotation (Line(points={{-55.5,77},{-50,77}, {-50,42},{16,42},{16,38},{14.8,38}}, color={255,0,255})); @@ -140,13 +140,13 @@ equation {-50,81.2},{-13.2,81.2}}, color={255,0,255})); connect(pre1.y, andTurnOff.u1) annotation (Line(points={{-71.4,-42},{-72,-42}, {-72,86},{-13.2,86}}, color={255,0,255})); - connect(nSetGreaterZero.y, andTurnOn.u2) annotation (Line(points={{-93.2,64},{ + connect(ySetGreaterZero.y, andTurnOn.u2) annotation (Line(points={{-93.2,64},{ -86,64},{-86,-98},{24,-98},{24,-88.8},{26.8,-88.8}}, color={255,0,255})); connect(notIsOn.y, andTurnOn.u1) annotation (Line(points={{-57.6,-18},{-56,-18}, {-56,-96},{22,-96},{22,-84},{26.8,-84}}, color={255,0,255})); connect(notIsOn.y, andIsOff.u2) annotation (Line(points={{-57.6,-18},{-56,-18}, {-56,33.2},{14.8,33.2}}, color={255,0,255})); - connect(sigBusHP.nSet, swinOutnSet.u3) annotation (Line( + connect(sigBusHP.ySet, swinOutySet.u3) annotation (Line( points={{-134.915,-68.925},{-134.915,-104},{78,-104},{78,-8},{88,-8}}, color={255,204,51}, thickness=0.5), Text( @@ -165,11 +165,11 @@ equation extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); annotation (Documentation(info="

- Checks if the nSet value is legal by checking if the device can + Checks if the ySet value is legal by checking if the device can either be turned on or off, depending on which state it was in.

- E.g. If it is turned on, and the new nSet value is 0, it will only + E.g. If it is turned on, and the new ySet value is 0, it will only turn off if current runtime is longer than the minimal runtime. Else it will keep the current rotating speed.

diff --git a/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/OperationalEnvelope.mo b/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/OperationalEnvelope.mo index d382c5f2fa..58c85f4e0e 100644 --- a/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/OperationalEnvelope.mo +++ b/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/OperationalEnvelope.mo @@ -32,7 +32,7 @@ block OperationalEnvelope equation connect(boundaryMap.noErr, swiErr.u2) annotation (Line(points={{-1.1,-3},{42, -3},{42,0},{84,0}}, color={255,0,255})); - connect(nSet,swiErr.u1) annotation (Line(points={{-136,20},{32,20},{32,8}, + connect(ySet,swiErr.u1) annotation (Line(points={{-136,20},{32,20},{32,8}, {84,8}},color={0,0,127})); connect(booConOpeEnv.y, swiErr.u2) annotation (Line( points={{24.7,-29},{24.7,-28},{42,-28},{42,0},{84,0}}, diff --git a/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/SafetyControl.mo b/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/SafetyControl.mo index 37fb61b14a..be75d1d940 100644 --- a/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/SafetyControl.mo +++ b/IBPSA/Fluid/HeatPumps/Controls/SafetyControls/SafetyControl.mo @@ -82,7 +82,7 @@ block SafetyControl "Block including all safety levels" annotation (Placement(transformation(extent={{-92,32},{-76,48}})), choicesAllMatching=true); Modelica.Blocks.Sources.BooleanConstant conTru(final k=true) - "Always true as the two blocks OperationalEnvelope and OnOffControl deal with whether the nSet value is correct or not" + "Always true as the two blocks OperationalEnvelope and OnOffControl deal with whether the ySet value is correct or not" annotation (Placement(transformation(extent={{58,-6},{70,6}}))); Modelica.Blocks.Interfaces.RealOutput Pel_deFro if not use_chiller and use_deFro @@ -112,7 +112,7 @@ block SafetyControl "Block including all safety levels" equation connect(conTru.y,swiErr.u2) annotation (Line(points={{70.6,0},{84,0}}, color={255,0,255})); - connect(onOffController.nOut, operationalEnvelope.nSet) annotation (Line( + connect(onOffController.nOut, operationalEnvelope.ySet) annotation (Line( points={{-24.5,1.63636},{-24,1.63636},{-24,3.2},{-11.6,3.2}}, color= {0,0,127})); @@ -140,15 +140,15 @@ equation index=-1, extent={{-3,-6},{-3,-6}}, horizontalAlignment=TextAlignment.Right)); - connect(nSet, defrostControl.nSet) annotation (Line( + connect(ySet, defrostControl.ySet) annotation (Line( points={{-136,20},{-124,20},{-124,4},{-114.88,4}}, color={0,0,127}, pattern=LinePattern.Dash)); - connect(nSet, realPasThrDef.u) annotation (Line( + connect(ySet, realPasThrDef.u) annotation (Line( points={{-136,20},{-116,20},{-116,40},{-93.6,40}}, color={0,0,127}, pattern=LinePattern.Dash)); - connect(realPasThrDef.y, onOffController.nSet) annotation (Line( + connect(realPasThrDef.y, onOffController.ySet) annotation (Line( points={{-75.2,40},{-60,40},{-60,1.63636},{-64.4,1.63636}}, color={0,0,127}, pattern=LinePattern.Dash)); @@ -156,7 +156,7 @@ equation points={{-136,-20},{-120,-20},{-120,-2.66667},{-114.88,-2.66667}}, color={255,0,255}, pattern=LinePattern.Dash)); - connect(defrostControl.nOut, onOffController.nSet) annotation (Line( + connect(defrostControl.nOut, onOffController.ySet) annotation (Line( points={{-74.2,4},{-74.2,1.63636},{-64.4,1.63636}}, color={0,0,127}, pattern=LinePattern.Dash)); @@ -178,7 +178,7 @@ equation points={{-94,19},{-94,28},{-54,28},{-54,80},{130,80}}, color={0,0,127}, pattern=LinePattern.Dash)); - connect(antiFreeze.nSet, operationalEnvelope.nOut) + connect(antiFreeze.ySet, operationalEnvelope.nOut) annotation (Line(points={{22.4,4},{18,4},{18,3.2},{15,3.2}}, color={0,0,127})); connect(antiFreeze.modeSet, operationalEnvelope.modeOut) diff --git a/IBPSA/Fluid/HeatPumps/Examples/HeatPump.mo b/IBPSA/Fluid/HeatPumps/Examples/HeatPump.mo index ee613ac170..db409f2ab0 100644 --- a/IBPSA/Fluid/HeatPumps/Examples/HeatPump.mo +++ b/IBPSA/Fluid/HeatPumps/Examples/HeatPump.mo @@ -245,7 +245,7 @@ equation horizontalAlignment=TextAlignment.Right)); connect(booleanStep.y, safetyControl.modeSet) annotation (Line(points={{43.4, 88},{32,88},{32,90},{8,90},{8,75.2},{-3.2,75.2}}, color={255,0,255})); - connect(booleanToReal.y, safetyControl.nSet) annotation (Line(points={{13.5, + connect(booleanToReal.y, safetyControl.ySet) annotation (Line(points={{13.5, 71},{4,71},{4,82.8},{-3.2,82.8}}, color={0,0,127})); connect(safetyControl.modeOut, sigBus.modeSet) annotation (Line(points={{ -49.75,75.2},{-64,75.2},{-64,46},{-19,46},{-19,39}}, color={255,0,255}), @@ -254,7 +254,7 @@ equation index=1, extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); - connect(safetyControl.nOut, sigBus.nSet) annotation (Line(points={{-49.75, + connect(safetyControl.nOut, sigBus.ySet) annotation (Line(points={{-49.75, 82.8},{-70,82.8},{-70,44},{-19,44},{-19,39}}, color={0,0,127}), Text( string="%second", index=1, diff --git a/IBPSA/Fluid/HeatPumps/SafetyControls/AntiFreeze.mo b/IBPSA/Fluid/HeatPumps/SafetyControls/AntiFreeze.mo index 21ccf26f95..26821f47ae 100644 --- a/IBPSA/Fluid/HeatPumps/SafetyControls/AntiFreeze.mo +++ b/IBPSA/Fluid/HeatPumps/SafetyControls/AntiFreeze.mo @@ -23,7 +23,7 @@ model AntiFreeze "Model to prevent source from freezing" annotation (Placement(transformation(extent={{-104,-24},{-84,-4}}))); equation - connect(nSet,swiErr.u1) annotation (Line(points={{-136,20},{32,20},{32,8},{84, + connect(ySet,swiErr.u1) annotation (Line(points={{-136,20},{32,20},{32,8},{84, 8}}, color={0,0,127})); connect(booConAntFre.y, swiErr.u2) annotation (Line( points={{16.7,-29},{16.7,-28},{42,-28},{42,0},{84,0}}, diff --git a/IBPSA/Fluid/HeatPumps/SafetyControls/BaseClasses.mo b/IBPSA/Fluid/HeatPumps/SafetyControls/BaseClasses.mo index 5ab5df6151..a6892fa6a0 100644 --- a/IBPSA/Fluid/HeatPumps/SafetyControls/BaseClasses.mo +++ b/IBPSA/Fluid/HeatPumps/SafetyControls/BaseClasses.mo @@ -175,7 +175,7 @@ For the boundaries of the y-input value, a dynamic hysteresis is used to ensure end BoundaryMapIcon; partial block PartialSafetyControl "Base Block" - Modelica.Blocks.Interfaces.RealInput nSet + Modelica.Blocks.Interfaces.RealInput ySet "Set value relative speed of compressor. Analog from 0 to 1" annotation (Placement(transformation(extent={{-152,4},{-120,36}}))); Modelica.Blocks.Interfaces.RealOutput nOut diff --git a/IBPSA/Fluid/HeatPumps/SafetyControls/DefrostControl.mo b/IBPSA/Fluid/HeatPumps/SafetyControls/DefrostControl.mo index c55861cc2c..b803d0d5c5 100644 --- a/IBPSA/Fluid/HeatPumps/SafetyControls/DefrostControl.mo +++ b/IBPSA/Fluid/HeatPumps/SafetyControls/DefrostControl.mo @@ -71,7 +71,7 @@ block DefrostControl equation connect(swiErr.y, nOut) annotation (Line(points={{107,0},{96,0},{96,20},{130, 20}}, color={0,0,127})); - connect(nSet, swiErr.u1) annotation (Line(points={{-136,20},{-26,20},{-26,8}, + connect(ySet, swiErr.u1) annotation (Line(points={{-136,20},{-26,20},{-26,8}, {84,8}}, color={0,0,127})); connect(sigBusHP.iceFacMea, iceFacGreMinHea.u) annotation (Line( diff --git a/IBPSA/Fluid/HeatPumps/SafetyControls/OnOffControl.mo b/IBPSA/Fluid/HeatPumps/SafetyControls/OnOffControl.mo index 6b11883fc3..7482a830d4 100644 --- a/IBPSA/Fluid/HeatPumps/SafetyControls/OnOffControl.mo +++ b/IBPSA/Fluid/HeatPumps/SafetyControls/OnOffControl.mo @@ -15,7 +15,7 @@ model OnOffControl annotation (Dialog(enable=use_runPerHou)); parameter Boolean pre_n_start=true "Start value of pre(n) at initial time"; Modelica.Blocks.Logical.GreaterThreshold - nSetGreaterZero(final threshold=Modelica.Constants.eps) + ySetGreaterZero(final threshold=Modelica.Constants.eps) "True if device is set on" annotation (Placement(transformation(extent={{-110,56},{-94,72}}))); Modelica.Blocks.Logical.And andRun @@ -56,7 +56,7 @@ model OnOffControl Modelica.Blocks.Logical.And andIsOn "Check if both set and actual value are greater zero" annotation (Placement(transformation(extent={{16,12},{28,24}}))); - Modelica.Blocks.Interfaces.RealInput nSet + Modelica.Blocks.Interfaces.RealInput ySet "Set value relative speed of compressor. Analog from 0 to 1" annotation (Placement(transformation(extent={{-152,-16},{-120,16}}))); Modelica.Blocks.Interfaces.RealOutput nOut @@ -64,11 +64,11 @@ model OnOffControl annotation (Placement(transformation(extent={{120,-10},{140,10}}))); Interfaces.VapourCompressionMachineControlBus sigBusHP annotation (Placement(transformation(extent={{-152,-84},{-118,-54}}))); - Modelica.Blocks.Logical.Switch swinOutnSet - "If any of the ornSet conditions is true, nSet will be passed. Else nOut will stay the same" + Modelica.Blocks.Logical.Switch swinOutySet + "If any of the orySet conditions is true, ySet will be passed. Else nOut will stay the same" annotation (Placement(transformation(extent={{90,-10},{110,10}}))); Modelica.Blocks.MathBoolean.Or orSetN(nu=4) - "Output is true if nSet value is correct" + "Output is true if ySet value is correct" annotation (Placement(transformation(extent={{52,-10},{72,10}}))); Modelica.Blocks.Logical.And andIsOff "Check if both set and actual value are equal to zero" @@ -102,25 +102,25 @@ equation color={255,0,255}, pattern=LinePattern.Dash)); - connect(nSet,nSetGreaterZero. u) annotation (Line(points={{-136,0},{-120,0},{-120, + connect(ySet,ySetGreaterZero. u) annotation (Line(points={{-136,0},{-120,0},{-120, 64},{-111.6,64}}, color={0,0,127})); - connect(nSetGreaterZero.y, notSetOn.u) annotation (Line(points={{-93.2,64},{-78, + connect(ySetGreaterZero.y, notSetOn.u) annotation (Line(points={{-93.2,64},{-78, 64},{-78,77},{-67,77}}, color={255,0,255})); connect(pre1.y, andIsOn.u2) annotation (Line(points={{-71.4,-42},{-71.4,12},{-72, 12},{-72,14},{-42,14},{-42,13.2},{14.8,13.2}}, color={255,0,255})); - connect(nSetGreaterZero.y, andIsOn.u1) annotation (Line(points={{-93.2,64},{-86, + connect(ySetGreaterZero.y, andIsOn.u1) annotation (Line(points={{-93.2,64},{-86, 64},{-86,18},{14.8,18}}, color={255,0,255})); connect(nOut, nOut) annotation (Line(points={{130,0},{130,0}}, color={0,0,127})); - connect(swinOutnSet.y, nOut) + connect(swinOutySet.y, nOut) annotation (Line(points={{111,0},{130,0}}, color={0,0,127})); - connect(nSet, swinOutnSet.u1) annotation (Line(points={{-136,0},{-120,0},{ + connect(ySet, swinOutySet.u1) annotation (Line(points={{-136,0},{-120,0},{ -120,98},{78,98},{78,8},{88,8}}, color={0,0,127})); connect(andTurnOff.y, andRun.u1) annotation (Line(points={{0.6,86},{8,86},{8,78}, {16.8,78}}, color={255,0,255})); - connect(orSetN.y, swinOutnSet.u2) + connect(orSetN.y, swinOutySet.u2) annotation (Line(points={{73.5,0},{88,0}}, color={255,0,255})); connect(notSetOn.y, andIsOff.u1) annotation (Line(points={{-55.5,77},{-50,77}, {-50,42},{16,42},{16,38},{14.8,38}}, color={255,0,255})); @@ -143,13 +143,13 @@ equation {-50,81.2},{-13.2,81.2}}, color={255,0,255})); connect(pre1.y, andTurnOff.u1) annotation (Line(points={{-71.4,-42},{-72,-42}, {-72,86},{-13.2,86}}, color={255,0,255})); - connect(nSetGreaterZero.y, andTurnOn.u2) annotation (Line(points={{-93.2,64},{ + connect(ySetGreaterZero.y, andTurnOn.u2) annotation (Line(points={{-93.2,64},{ -86,64},{-86,-98},{24,-98},{24,-88.8},{26.8,-88.8}}, color={255,0,255})); connect(notIsOn.y, andTurnOn.u1) annotation (Line(points={{-57.6,-18},{-56,-18}, {-56,-96},{22,-96},{22,-84},{26.8,-84}}, color={255,0,255})); connect(notIsOn.y, andIsOff.u2) annotation (Line(points={{-57.6,-18},{-56,-18}, {-56,33.2},{14.8,33.2}}, color={255,0,255})); - connect(sigBusHP.nSet, swinOutnSet.u3) annotation (Line( + connect(sigBusHP.ySet, swinOutySet.u3) annotation (Line( points={{-135,-69},{-135,-104},{78,-104},{78,-8},{88,-8}}, color={255,204,51}, thickness=0.5), Text( @@ -168,11 +168,11 @@ equation extent={{-6,3},{-6,3}}, horizontalAlignment=TextAlignment.Right)); annotation (Documentation(info="

- Checks if the nSet value is legal by checking if the device can + Checks if the ySet value is legal by checking if the device can either be turned on or off, depending on which state it was in.

- E.g. If it is turned on, and the new nSet value is 0, it will only + E.g. If it is turned on, and the new ySet value is 0, it will only turn off if current runtime is longer than the minimal runtime. Else it will keep the current rotating speed.

diff --git a/IBPSA/Fluid/HeatPumps/SafetyControls/OperationalEnvelope.mo b/IBPSA/Fluid/HeatPumps/SafetyControls/OperationalEnvelope.mo index e2d2233321..82c9655c08 100644 --- a/IBPSA/Fluid/HeatPumps/SafetyControls/OperationalEnvelope.mo +++ b/IBPSA/Fluid/HeatPumps/SafetyControls/OperationalEnvelope.mo @@ -30,7 +30,7 @@ block OperationalEnvelope equation connect(boundaryMap.noErr, swiErr.u2) annotation (Line(points={{-1.1,-3},{42, -3},{42,0},{84,0}}, color={255,0,255})); - connect(nSet,swiErr.u1) annotation (Line(points={{-136,20},{32,20},{32,8}, + connect(ySet,swiErr.u1) annotation (Line(points={{-136,20},{32,20},{32,8}, {84,8}},color={0,0,127})); connect(booConOpeEnv.y, swiErr.u2) annotation (Line( points={{24.7,-29},{24.7,-28},{42,-28},{42,0},{84,0}}, diff --git a/IBPSA/Fluid/HeatPumps/SafetyControls/SafetyControl.mo b/IBPSA/Fluid/HeatPumps/SafetyControls/SafetyControl.mo index 51dc2d7426..bdf2ded4cf 100644 --- a/IBPSA/Fluid/HeatPumps/SafetyControls/SafetyControl.mo +++ b/IBPSA/Fluid/HeatPumps/SafetyControls/SafetyControl.mo @@ -83,7 +83,7 @@ block SafetyControl "Block including all safety levels" annotation (Placement(transformation(extent={{-92,32},{-76,48}})), choicesAllMatching=true); Modelica.Blocks.Sources.BooleanConstant conTru(final k=true) - "Always true as the two blocks OperationalEnvelope and OnOffControl deal with whether the nSet value is correct or not" + "Always true as the two blocks OperationalEnvelope and OnOffControl deal with whether the ySet value is correct or not" annotation (Placement(transformation(extent={{58,-6},{70,6}}))); Modelica.Blocks.Interfaces.RealOutput Pel_deFro if not use_chiller and use_deFro @@ -114,7 +114,7 @@ block SafetyControl "Block including all safety levels" equation connect(conTru.y,swiErr.u2) annotation (Line(points={{70.6,0},{84,0}}, color={255,0,255})); - connect(onOffController.nOut, operationalEnvelope.nSet) annotation (Line( + connect(onOffController.nOut, operationalEnvelope.ySet) annotation (Line( points={{-24.5,1.63636},{-24,1.63636},{-24,3.2},{-11.6,3.2}}, color= {0,0,127})); @@ -142,15 +142,15 @@ equation index=-1, extent={{-3,-6},{-3,-6}}, horizontalAlignment=TextAlignment.Right)); - connect(nSet, defrostControl.nSet) annotation (Line( + connect(ySet, defrostControl.ySet) annotation (Line( points={{-136,20},{-124,20},{-124,2},{-114.4,2}}, color={0,0,127}, pattern=LinePattern.Dash)); - connect(nSet, realPasThrDef.u) annotation (Line( + connect(ySet, realPasThrDef.u) annotation (Line( points={{-136,20},{-116,20},{-116,40},{-93.6,40}}, color={0,0,127}, pattern=LinePattern.Dash)); - connect(realPasThrDef.y, onOffController.nSet) annotation (Line( + connect(realPasThrDef.y, onOffController.ySet) annotation (Line( points={{-75.2,40},{-60,40},{-60,1.63636},{-64.4,1.63636}}, color={0,0,127}, pattern=LinePattern.Dash)); @@ -158,7 +158,7 @@ equation points={{-136,-20},{-120,-20},{-120,-4},{-114.4,-4}}, color={255,0,255}, pattern=LinePattern.Dash)); - connect(defrostControl.nOut, onOffController.nSet) annotation (Line( + connect(defrostControl.nOut, onOffController.ySet) annotation (Line( points={{-74.5,2},{-74.5,1.63636},{-64.4,1.63636}}, color={0,0,127}, pattern=LinePattern.Dash)); @@ -179,7 +179,7 @@ equation points={{-94,15.5},{-94,28},{-54,28},{-54,80},{130,80}}, color={0,0,127}, pattern=LinePattern.Dash)); - connect(antiFreeze.nSet, operationalEnvelope.nOut) + connect(antiFreeze.ySet, operationalEnvelope.nOut) annotation (Line(points={{22.4,4},{18,4},{18,3.2},{15,3.2}}, color={0,0,127})); connect(antiFreeze.modeSet, operationalEnvelope.modeOut)