Skip to content

Commit

Permalink
merged master
Browse files Browse the repository at this point in the history
  • Loading branch information
JayHuLBL committed Aug 31, 2023
2 parents 0976d60 + 1ad1579 commit da0b636
Show file tree
Hide file tree
Showing 41 changed files with 2,415 additions and 139 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,11 @@ protected
Buildings.Controls.OBC.CDL.Integers.Equal intEqu
"Check if operation mode is occupied"
annotation (Placement(transformation(extent={{-160,20},{-140,40}})));
Buildings.Controls.OBC.CDL.Logical.And3 enaMinDam
"Check if the minimum outdoor air damper should be enabled"
Buildings.Controls.OBC.CDL.Logical.And enaMinDam1
"Check if the minimum outdoor air damper should be enabled, one of two stacked And blocks"
annotation (Placement(transformation(extent={{-100,60},{-80,80}})));
Buildings.Controls.OBC.CDL.Logical.And enaMinDam2
"Check if the minimum outdoor air damper should be enabled, one of two stacked And blocks"
annotation (Placement(transformation(extent={{-40,60},{-20,80}})));
Buildings.Controls.OBC.CDL.Reals.Sources.Constant one(
final k=1) "Constant"
Expand Down Expand Up @@ -315,24 +318,20 @@ equation
{-42,-98}}, color={0,0,127}));
connect(moaP.y, gai.u) annotation (Line(points={{-98,-90},{-90,-90},{-90,-120},
{-82,-120}}, color={0,0,127}));
connect(enaMinDam.y, enaRetDamMin.u1) annotation (Line(points={{-18,70},{-10,70},
{-10,10},{38,10}}, color={255,0,255}));
connect(enaMinDam2.y, enaRetDamMin.u1) annotation (Line(points={{-18,70},{-10,
70},{-10,10},{38,10}}, color={255,0,255}));
connect(les.y, enaRetDamMin.u2) annotation (Line(points={{-18,-30},{10,-30},{10,
2},{38,2}}, color={255,0,255}));
connect(enaRetDamMin.y, enaDis.u)
annotation (Line(points={{62,10},{78,10}}, color={255,0,255}));
connect(enaMinDam.y, disMinDam.u) annotation (Line(points={{-18,70},{-10,70},{
-10,-60},{-2,-60}}, color={255,0,255}));
connect(enaMinDam2.y, disMinDam.u) annotation (Line(points={{-18,70},{-10,70},
{-10,-60},{-2,-60}}, color={255,0,255}));
connect(disMinDam.y, disRetDamMin.u1)
annotation (Line(points={{22,-60},{38,-60}}, color={255,0,255}));
connect(gre.y, disRetDamMin.u2) annotation (Line(points={{-18,-90},{30,-90},{30,
-68},{38,-68}},color={255,0,255}));
connect(disRetDamMin.y, enaDis.clr) annotation (Line(points={{62,-60},{70,-60},
{70,4},{78,4}}, color={255,0,255}));
connect(greThr.y, enaMinDam.u1) annotation (Line(points={{-58,150},{-50,150},{
-50,78},{-42,78}}, color={255,0,255}));
connect(intEqu.y, enaMinDam.u3) annotation (Line(points={{-138,30},{-60,30},{-60,
62},{-42,62}}, color={255,0,255}));
connect(minDp.y, maxRetDam.u_s) annotation (Line(points={{-98,170},{118,170}},
color={0,0,127}));
connect(dpMinOutDam, maxRetDam.u_m)
Expand Down Expand Up @@ -361,10 +360,8 @@ equation
annotation (Line(points={{-178,-170},{240,-170}}, color={0,0,127}));
connect(outDamPhyPosMaxSig.y, yOutDam_max)
annotation (Line(points={{-178,-210},{240,-210}}, color={0,0,127}));
connect(enaMinDam.y, y1MinOutDam)
connect(enaMinDam2.y, y1MinOutDam)
annotation (Line(points={{-18,70},{240,70}}, color={255,0,255}));
connect(u1SupFan, enaMinDam.u2)
annotation (Line(points={{-240,70},{-42,70}}, color={255,0,255}));
connect(effAbsOutAir_normalized, pro1.u1) annotation (Line(points={{-240,300},
{-200,300},{-200,306},{-182,306}}, color={0,0,127}));
connect(effAbsOutAir_normalized, pro1.u2) annotation (Line(points={{-240,300},
Expand Down Expand Up @@ -401,6 +398,14 @@ equation
170},{-90,170},{-90,150},{-82,150}}, color={0,0,127}));
connect(one2.y, minDp1.u) annotation (Line(points={{-98,250},{-80,250},{-80,270},
{18,270}}, color={0,0,127}));
connect(intEqu.y, enaMinDam1.u2) annotation (Line(points={{-138,30},{-112,30},
{-112,62},{-102,62}}, color={255,0,255}));
connect(u1SupFan, enaMinDam1.u1)
annotation (Line(points={{-240,70},{-102,70}}, color={255,0,255}));
connect(greThr.y, enaMinDam2.u1) annotation (Line(points={{-58,150},{-52,150},
{-52,70},{-42,70}}, color={255,0,255}));
connect(enaMinDam1.y, enaMinDam2.u2) annotation (Line(points={{-78,70},{-60,70},
{-60,62},{-42,62}}, color={255,0,255}));
annotation (
defaultComponentName="ecoLim",
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}),
Expand Down Expand Up @@ -552,6 +557,13 @@ point.
revisions="<html>
<ul>
<li>
August 29, 2023, by Hongxiang Fu:<br/>
Because of the removal of <code>Logical.And3</code> based on ASHRAE 231P,
replaced it with a stack of two <code>Logical.And</code> blocks.
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/2465\">#2465</a>.
</li>
<li>
August 1, 2020, by Jianjun Hu:<br/>
First implementation.
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,12 @@ block Enable
annotation (Placement(transformation(extent={{180,-260},{220,-220}}),
iconTransformation(extent={{100,-80},{140,-40}})));

Buildings.Controls.OBC.CDL.Logical.And3 andEnaDis
Buildings.Controls.OBC.CDL.Logical.And andFrePro
"Logical and that checks freeze protection stage"
annotation (Placement(transformation(extent={{-10,30},{10,50}})));
Buildings.Controls.OBC.CDL.Logical.And andEnaDis
"Logical and that checks freeze protection stage and zone state"
annotation (Placement(transformation(extent={{40,30},{60,50}})));
annotation (Placement(transformation(extent={{40,30},{60,50}})));
Buildings.Controls.OBC.CDL.Logical.TrueFalseHold truFalHol(
trueHoldDuration=600) "10 min on/off delay"
annotation (Placement(transformation(extent={{120,210},{140,230}})));
Expand Down Expand Up @@ -209,16 +212,13 @@ equation
{-60,-132},{38,-132}}, color={0,0,127}));
connect(uOutDam_max, maxOutDam.u3) annotation (Line(points={{-200,-130},{-80,-130},
{-80,-148},{38,-148}}, color={0,0,127}));
connect(andEnaDis.y, not2.u)
annotation (Line(points={{62,40},{72,40},{72,-20},{-20,-20},{-20,-60},{-12,-60}},
color={255,0,255}));
connect(andEnaDis.y, not2.u) annotation (Line(points={{62,40},{72,40},{72,-20},
{-20,-20},{-20,-60},{-12,-60}}, color={255,0,255}));
connect(minRetDam.y, yRetDam_min)
annotation (Line(points={{62,-240},{200,-240}}, color={0,0,127}));
connect(truFalHol.y, and1.u1)
annotation (Line(points={{142,220},{164,220},{164,130},{-26,130},{-26,110},{2,110}},
color={255,0,255}));
connect(and1.y, andEnaDis.u1)
annotation (Line(points={{26,110},{30,110},{30,48},{38,48}}, color={255,0,255}));
connect(u1SupFan, and1.u2) annotation (Line(points={{-200,110},{-102,110},{-102,
102},{2,102}}, color={255,0,255}));
connect(retDamPhyMax.y, minRetDam.u1) annotation (Line(points={{-118,-210},
Expand All @@ -241,10 +241,6 @@ equation
annotation (Line(points={{-200,0},{-82,0}}, color={255,127,0}));
connect(uFreProSta, intEqu.u1)
annotation (Line(points={{-200,60},{-82,60}}, color={255,127,0}));
connect(intEqu.y, andEnaDis.u2)
annotation (Line(points={{-58,60},{-10,60},{-10,40},{38,40}}, color={255,0,255}));
connect(not3.y, andEnaDis.u3)
annotation (Line(points={{-22,0},{8,0},{8,32},{38,32}}, color={255,0,255}));
connect(hysOutTem.y, or2.u1)
annotation (Line(points={{-78,250},{-20,250},{-20,220},{38,220}},
color={255,0,255}));
Expand All @@ -254,6 +250,14 @@ equation
{38,212}}, color={255,0,255}));
connect(or2.y, truFalHol.u) annotation (Line(points={{62,220},{118,220}},
color={255,0,255}));
connect(not3.y, andFrePro.u2) annotation (Line(points={{-22,0},{-16,0},{-16,
32},{-12,32}}, color={255,0,255}));
connect(andFrePro.u1, intEqu.y) annotation (Line(points={{-12,40},{-48,40},{-48,
60},{-58,60}}, color={255,0,255}));
connect(and1.y, andEnaDis.u1) annotation (Line(points={{26,110},{32,110},{32,
40},{38,40}}, color={255,0,255}));
connect(andEnaDis.u2, andFrePro.y) annotation (Line(points={{38,32},{20,32},{
20,40},{12,40}}, color={255,0,255}));
annotation (
defaultComponentName = "enaDis",
Icon(graphics={
Expand Down Expand Up @@ -381,6 +385,13 @@ src=\"modelica://Buildings/Resources/Images/Controls/OBC/ASHRAE/G36/AHUs/SingleZ
</html>", revisions="<html>
<ul>
<li>
August 29, 2023, by Hongxiang Fu:<br/>
Because of the removal of <code>Logical.And3</code> based on ASHRAE 231P,
replaced it with a stack of two <code>Logical.And</code> blocks.
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/2465\">#2465</a>.
</li>
<li>
August 1, 2020, by Jianjun Hu:<br/>
Updated according to ASHRAE G36, May 2020.
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ protected
annotation (Placement(transformation(extent={{-140,-160},{-120,-140}})));
Buildings.Controls.OBC.CDL.Integers.Equal intEqu1 "Check if operation mode is occupied"
annotation (Placement(transformation(extent={{-100,-140},{-80,-120}})));
Buildings.Controls.OBC.CDL.Logical.And3 and3 "Logical and"
Buildings.Controls.OBC.CDL.Logical.And and1 "Logical and"
annotation (Placement(transformation(extent={{-70,-120},{-50,-100}})));
Buildings.Controls.OBC.CDL.Logical.And and2 "Logical and"
annotation (Placement(transformation(extent={{-60,-80},{-40,-60}})));
Buildings.Controls.OBC.CDL.Reals.Switch enaDis2
"Zero minimum damper position when the min OA is near zero"
Expand Down Expand Up @@ -253,13 +255,7 @@ equation
annotation (Line(points={{-102,-98},{-110,-98},{-110,-110},{-118,-110}}, color={255,127,0}));
connect(uFreProSta, intLesEqu.u1)
annotation (Line(points={{-180,-90},{-102,-90}}, color={255,127,0}));
connect(u1SupFan, and3.u1) annotation (Line(points={{-180,-40},{-80,-40},{-80,
-62},{-62,-62}}, color={255,0,255}));
connect(intLesEqu.y, and3.u2) annotation (Line(points={{-78,-90},{-74,-90},{-74,
-70},{-62,-70}}, color={255,0,255}));
connect(intEqu1.y, and3.u3) annotation (Line(points={{-78,-130},{-68,-130},{-68,
-78},{-62,-78}}, color={255,0,255}));
connect(and3.y, not1.u)
connect(and2.y, not1.u)
annotation (Line(points={{-38,-70},{-22,-70}}, color={255,0,255}));
connect(VOutMinSet_flow, noZerMin.u) annotation (Line(points={{-180,180},{-30,
180},{-30,-160},{18,-160}}, color={0,0,127}));
Expand All @@ -272,6 +268,14 @@ equation
connect(zer.y, enaDis2.u3) annotation (Line(points={{102,-190},{110,-190},{110,
-168},{118,-168}}, color={0,0,127}));

connect(intLesEqu.y, and1.u1) annotation (Line(points={{-78,-90},{-74,-90},{-74,
-110},{-72,-110}}, color={255,0,255}));
connect(and1.u2, intEqu1.y) annotation (Line(points={{-72,-118},{-74,-118},{-74,
-130},{-78,-130}}, color={255,0,255}));
connect(and1.y, and2.u2) annotation (Line(points={{-48,-110},{-40,-110},{-40,-86},
{-66,-86},{-66,-78},{-62,-78}}, color={255,0,255}));
connect(u1SupFan, and2.u1) annotation (Line(points={{-180,-40},{-66,-40},{-66,
-70},{-62,-70}}, color={255,0,255}));
annotation (
defaultComponentName = "damLim",
Icon(graphics={
Expand Down Expand Up @@ -444,6 +448,13 @@ src=\"modelica://Buildings/Resources/Images/Controls/OBC/ASHRAE/G36/AHUs/SingleZ
</html>", revisions="<html>
<ul>
<li>
August 29, 2023, by Hongxiang Fu:<br/>
Because of the removal of <code>Logical.And3</code> based on ASHRAE 231P,
replaced it with a stack of two <code>Logical.And</code> blocks.
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/2465\">#2465</a>.
</li>
<li>
August 1, 2020, by Jianjun Hu:<br/>
Updated according to ASHRAE G36, May 2020.
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ block Alarms "Generate alarms of cooling only terminal unit"
final min=0,
final unit="1")
"Damper position setpoint"
annotation (Placement(transformation(extent={{-280,-230},{-240,-190}}),
annotation (Placement(transformation(extent={{-280,-240},{-240,-200}}),
iconTransformation(extent={{-140,-100},{-100,-60}})));
Buildings.Controls.OBC.CDL.Interfaces.IntegerOutput yLowFloAla
"Low airflow alarms"
Expand Down Expand Up @@ -196,9 +196,12 @@ block Alarms "Generate alarms of cooling only terminal unit"
final t=damPosHys,
final h=0.5*damPosHys)
"Check if damper position is near zero"
annotation (Placement(transformation(extent={{-200,-220},{-180,-200}})));
Buildings.Controls.OBC.CDL.Logical.And3 leaDamAla
"Check if generating leak damper alarms"
annotation (Placement(transformation(extent={{-200,-230},{-180,-210}})));
Buildings.Controls.OBC.CDL.Logical.And leaDamAla1
"Check if generating leak damper alarms, one of two stacked And blocks"
annotation (Placement(transformation(extent={{-100,-180},{-80,-160}})));
Buildings.Controls.OBC.CDL.Logical.And leaDamAla2
"Check if generating leak damper alarms, one of two stacked And blocks"
annotation (Placement(transformation(extent={{-40,-180},{-20,-160}})));
Buildings.Controls.OBC.CDL.Logical.Not not5 "Logical not"
annotation (Placement(transformation(extent={{100,-220},{120,-200}})));
Expand Down Expand Up @@ -227,7 +230,7 @@ block Alarms "Generate alarms of cooling only terminal unit"
Buildings.Controls.OBC.CDL.Integers.Sources.Constant occMod(
final k=Buildings.Controls.OBC.ASHRAE.G36.Types.OperationModes.occupied)
"Occupied mode"
annotation (Placement(transformation(extent={{-160,-200},{-140,-180}})));
annotation (Placement(transformation(extent={{-160,-210},{-140,-190}})));
Buildings.Controls.OBC.CDL.Integers.Equal isOcc
"Check if current operation mode is occupied mode"
annotation (Placement(transformation(extent={{-100,-150},{-80,-130}})));
Expand Down Expand Up @@ -297,11 +300,7 @@ equation
connect(proInt.y, yLowFloAla)
annotation (Line(points={{222,150},{260,150}}, color={255,127,0}));
connect(uDam, cloDam.u)
annotation (Line(points={{-260,-210},{-202,-210}}, color={0,0,127}));
connect(u1Fan, leaDamAla.u2) annotation (Line(points={{-260,-100},{-220,-100},
{-220,-170},{-42,-170}},color={255,0,255}));
connect(cloDam.y, leaDamAla.u3) annotation (Line(points={{-178,-210},{-100,-210},
{-100,-178},{-42,-178}}, color={255,0,255}));
annotation (Line(points={{-260,-220},{-202,-220}}, color={0,0,127}));
connect(not5.y, assMes3.u)
annotation (Line(points={{122,-210},{138,-210}}, color={255,0,255}));
connect(booToInt3.y, yLeaDamAla)
Expand All @@ -318,10 +317,6 @@ equation
annotation (Line(points={{-78,-40},{-42,-40}}, color={255,0,255}));
connect(not3.y, and5.u2) annotation (Line(points={{-178,-100},{-60,-100},{-60,
-48},{-42,-48}}, color={255,0,255}));
connect(gre1.y, leaDamAla.u1) annotation (Line(points={{-78,-40},{-70,-40},{-70,
-162},{-42,-162}}, color={255,0,255}));
connect(leaDamAla.y, truDel3.u)
annotation (Line(points={{-18,-170},{18,-170}}, color={255,0,255}));
connect(truDel3.y, booToInt3.u)
annotation (Line(points={{42,-170},{138,-170}}, color={255,0,255}));
connect(truDel3.y, not5.u) annotation (Line(points={{42,-170},{80,-170},{80,-210},
Expand All @@ -337,12 +332,11 @@ equation
connect(u1Fan, fanIni.u) annotation (Line(points={{-260,-100},{-220,-100},{-220,
0},{-202,0}}, color={255,0,255}));
connect(fanIni.y, and11.u2) annotation (Line(points={{-178,0},{-130,0},{-130,
32},{-122,32}},
color={255,0,255}));
32},{-122,32}}, color={255,0,255}));
connect(fanIni.y, and10.u2) annotation (Line(points={{-178,0},{-130,0},{-130,162},
{-122,162}}, color={255,0,255}));
connect(occMod.y,isOcc. u2) annotation (Line(points={{-138,-190},{-120,-190},{
-120,-148},{-102,-148}}, color={255,127,0}));
connect(occMod.y,isOcc. u2) annotation (Line(points={{-138,-200},{-120,-200},
{-120,-148},{-102,-148}},color={255,127,0}));
connect(uOpeMod,isOcc. u1)
annotation (Line(points={{-260,-140},{-102,-140}}, color={255,127,0}));
connect(and6.y, booToInt2.u)
Expand Down Expand Up @@ -371,6 +365,16 @@ equation
{38,162}}, color={255,0,255}));
connect(isOcc.y, and3.u2) annotation (Line(points={{-78,-140},{30,-140},{30,82},
{38,82}}, color={255,0,255}));
connect(u1Fan, leaDamAla1.u1) annotation (Line(points={{-260,-100},{-220,-100},
{-220,-170},{-102,-170}}, color={255,0,255}));
connect(cloDam.y, leaDamAla1.u2) annotation (Line(points={{-178,-220},{-110,
-220},{-110,-178},{-102,-178}}, color={255,0,255}));
connect(leaDamAla1.y, leaDamAla2.u1)
annotation (Line(points={{-78,-170},{-42,-170}}, color={255,0,255}));
connect(gre1.y, leaDamAla2.u2) annotation (Line(points={{-78,-40},{-70,-40},{
-70,-178},{-42,-178}}, color={255,0,255}));
connect(leaDamAla2.y, truDel3.u)
annotation (Line(points={{-18,-170},{18,-170}}, color={255,0,255}));
annotation (defaultComponentName="ala",
Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}}),
graphics={
Expand Down Expand Up @@ -467,6 +471,13 @@ fan serving the zone is proven on (<code>uFan=true</code>), generate a Level
</html>",revisions="<html>
<ul>
<li>
August 29, 2023, by Hongxiang Fu:<br/>
Because of the removal of <code>Logical.And3</code> based on ASHRAE 231P,
replaced it with a stack of two <code>Logical.And</code> blocks.
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/2465\">#2465</a>.
</li>
<li>
August 23, 2023, by Jianjun Hu:<br/>
Added delay <code>staTim</code> to allow the system becoming stablized.
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3257\">issue 3257</a>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,13 @@ fan serving the zone is proven on (<code>u1HeaFan=true</code>), generate a Level
</html>",revisions="<html>
<ul>
<li>
August 29, 2023, by Hongxiang Fu:<br/>
Because of the removal of <code>Logical.And3</code> based on ASHRAE 231P,
replaced it with a stack of two <code>Logical.And</code> blocks.
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/2465\">#2465</a>.
</li>
<li>
August 23, 2023, by Jianjun Hu:<br/>
Added delay <code>staTim</code> to allow the system becoming stablized.
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3257\">issue 3257</a>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,13 @@ generate a Level 4 alarm.
</html>",revisions="<html>
<ul>
<li>
August 29, 2023, by Hongxiang Fu:<br/>
Because of the removal of <code>Logical.And3</code> based on ASHRAE 231P,
replaced it with a stack of two <code>Logical.And</code> blocks.
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/2465\">#2465</a>.
</li>
<li>
August 23, 2023, by Jianjun Hu:<br/>
Added delay <code>staTim</code> to allow the system becoming stablized.
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3257\">issue 3257</a>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,13 @@ fan serving the zone is proven on (<code>u1HeaFan=true</code>), generate a Level
</html>",revisions="<html>
<ul>
<li>
August 29, 2023, by Hongxiang Fu:<br/>
Because of the removal of <code>Logical.And3</code> based on ASHRAE 231P,
replaced it with a stack of two <code>Logical.And</code> blocks.
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/2465\">#2465</a>.
</li>
<li>
August 23, 2023, by Jianjun Hu:<br/>
Added delay <code>staTim</code> to allow the system becoming stablized.
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3257\">issue 3257</a>.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,13 @@ generate a Level 4 alarm.
</html>",revisions="<html>
<ul>
<li>
August 29, 2023, by Hongxiang Fu:<br/>
Because of the removal of <code>Logical.And3</code> based on ASHRAE 231P,
replaced it with a stack of two <code>Logical.And</code> blocks.
This is for
<a href=\"https://github.com/lbl-srg/modelica-buildings/issues/2465\">#2465</a>.
</li>
<li>
August 23, 2023, by Jianjun Hu:<br/>
Added delay <code>staTim</code> to allow the system becoming stablized.
This is for <a href=\"https://github.com/lbl-srg/modelica-buildings/issues/3257\">issue 3257</a>.
Expand Down
Loading

0 comments on commit da0b636

Please sign in to comment.