Skip to content

Commit c1bf89c

Browse files
authored
Merge pull request #1978 from ibpsa/issue1977_removeHysteresis
Remove hysteresis from PartialReversibleRefrigerantMachine
2 parents 18ff178 + 4bba8c1 commit c1bf89c

File tree

3 files changed

+45
-15
lines changed

3 files changed

+45
-15
lines changed

IBPSA/Fluid/Chillers/ModularReversible/Modular.mo

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ model Modular
8282
extent={{-10,-10},{10,10}},
8383
rotation=0,
8484
origin={70,50})));
85+
Modelica.Blocks.Logical.Hysteresis hys(
86+
final uLow=0.001,
87+
final uHigh=ySet_small,
88+
final pre_y_start=false)
89+
"Outputs whether the device is on based on the relative speed"
90+
annotation (Placement(
91+
transformation(extent={{10,10},{-10,-10}}, rotation=180, origin={-110,-90})));
8592
equation
8693
connect(conCoo.y, sigBus.coo)
8794
annotation (Line(points={{-99,-130},{-76,-130},{-76,-40},{-138,-40},{-138,-42},
@@ -102,11 +109,23 @@ equation
102109
index=1,
103110
extent={{-6,3},{-6,3}},
104111
horizontalAlignment=TextAlignment.Right));
112+
connect(hys.y, sigBus.onOffMea) annotation (Line(points={{-99,-90},{-88,-90},
113+
{-88,-70},{-128,-70},{-128,-40},{-134,-40},{-134,-41},{-141,-41}},
114+
color={255,0,255}));
115+
connect(hys.u, sigBus.yMea) annotation (Line(points={{-122,-90},{-132,-90},{
116+
-132,-40},{-136,-40},{-136,-41},{-141,-41}},
117+
color={0,0,127}));
105118
annotation (Icon(coordinateSystem(extent={{-100,-100},{100,100}})),
106119
Diagram(coordinateSystem(extent={{-140,-160},{140,160}})),
107120
Documentation(revisions="<html>
108121
<ul>
109122
<li>
123+
February 25, 2025, by Antoine Gautier:<br/>
124+
Added hysteresis that was removed from base class.<br/>
125+
This is for
126+
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1977\">IBPSA #1977</a>.
127+
</li>
128+
<li>
110129
May 2, 2024, by Michael Wetter:<br/>
111130
Refactored check for device identifiers.<br/>
112131
This is for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1576\">IBPSA, #1576</a>.

IBPSA/Fluid/HeatPumps/ModularReversible/BaseClasses/PartialReversibleRefrigerantMachine.mo

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,6 @@ partial model PartialReversibleRefrigerantMachine
313313
extent={{-10,10},{10,-10}},
314314
rotation=0)));
315315

316-
Modelica.Blocks.Logical.Hysteresis hys(
317-
final uLow=0.001,
318-
final uHigh=ySet_small,
319-
final pre_y_start=false) "Use default ySet value" annotation (Placement(
320-
transformation(extent={{10,10},{-10,-10}}, rotation=180,
321-
origin={-110,-90})));
322-
323316
RefrigerantCycleInertia refCycIneCon "Inertia model for condenser side"
324317
annotation(Placement(transformation(
325318
extent={{-10,-10},{10,10}},
@@ -491,9 +484,6 @@ equation
491484
string="%second",
492485
index=1,
493486
extent={{6,3},{6,3}}));
494-
connect(hys.y, sigBus.onOffMea) annotation (Line(points={{-99,-90},{-88,-90},{
495-
-88,-70},{-128,-70},{-128,-40},{-134,-40},{-134,-41},{-141,-41}},
496-
color={255,0,255}));
497487
connect(TConAmb, sigBus.TConAmbMea) annotation (Line(
498488
points={{-152,120},{-128,120},{-128,50},{-76,50},{-76,-42},{-78,-42},{-78,
499489
-41},{-141,-41}},
@@ -503,9 +493,6 @@ equation
503493
points={{-152,-130},{-130,-130},{-130,-110},{-76,-110},{-76,-41},{-141,-41}},
504494
color={0,0,127},
505495
pattern=LinePattern.Dash));
506-
connect(hys.u, sigBus.yMea) annotation (Line(points={{-122,-90},{-132,-90},{-132,
507-
-40},{-136,-40},{-136,-41},{-141,-41}},
508-
color={0,0,127}));
509496
connect(con.T, sigBus.TConOutMea) annotation (Line(points={{22.4,90},{38,90},{
510497
38,32},{-76,32},{-76,-40},{-140,-40},{-140,-41},{-141,-41}},
511498
color={0,0,127}));
@@ -697,6 +684,12 @@ equation
697684
This is for
698685
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1979\">IBPSA #1979</a>.
699686
</li>
687+
<li>
688+
<i>February 25, 2025</i> by Antoine Gautier:<br/>
689+
Removed hysteresis.<br/>
690+
This is for
691+
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1977\">IBPSA #1977</a>.
692+
</li>
700693
<li>
701694
<i>August 19, 2024</i> by Michael Wetter:<br/>
702695
Changed markup commands for code merge.<br/>

IBPSA/Fluid/HeatPumps/ModularReversible/Modular.mo

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ model Modular
7474
"=true for heating, =false for cooling"
7575
annotation (Placement(transformation(extent={{-164,-82},{-140,-58}}),
7676
iconTransformation(extent={{-120,-30},{-102,-12}})));
77+
Modelica.Blocks.Logical.Hysteresis hys(
78+
final uLow=0.001,
79+
final uHigh=ySet_small,
80+
final pre_y_start=false)
81+
"Outputs whether the device is on based on the relative speed"
82+
annotation (Placement(
83+
transformation(extent={{10,10},{-10,-10}}, rotation=180, origin={-110,-90})));
7784
equation
7885
connect(conHea.y, sigBus.hea)
7986
annotation (Line(points={{-99,-130},{-76,-130},{-76,-40},{-140,-40},{-140,-41},
@@ -90,16 +97,27 @@ equation
9097
index=1,
9198
extent={{-6,3},{-6,3}},
9299
horizontalAlignment=TextAlignment.Right));
100+
connect(hys.y, sigBus.onOffMea) annotation (Line(points={{-99,-90},{-88,-90},
101+
{-88,-70},{-128,-70},{-128,-40},{-134,-40},{-134,-41},{-141,-41}},
102+
color={255,0,255}));
103+
connect(hys.u, sigBus.yMea) annotation (Line(points={{-122,-90},{-132,-90},{
104+
-132,-40},{-136,-40},{-136,-41},{-141,-41}},
105+
color={0,0,127}));
93106
annotation (Icon(coordinateSystem(extent={{-100,-100},{100,100}}), graphics={
94107
Text(
95108
extent={{-100,-12},{-72,-30}},
96109
textColor={255,85,255},
97110
visible=not use_busConOnl and use_rev,
98111
textString="hea")}),
99112
Diagram(coordinateSystem(extent={{-140,-160},{140,160}})),
100-
Documentation(revisions="
101-
<html>
113+
Documentation(revisions="<html>
102114
<ul>
115+
<li>
116+
February 25, 2025, by Antoine Gautier:<br/>
117+
Added hysteresis that was removed from base class.<br/>
118+
This is for
119+
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1977\">IBPSA #1977</a>.
120+
</li>
103121
<li>
104122
May 2, 2024, by Michael Wetter:<br/>
105123
Refactored check for device identifiers.<br/>

0 commit comments

Comments
 (0)