diff --git a/.travis.yml b/.travis.yml index 729943b9af8..d732ac746dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ -dist: trusty -sudo: false +dist: bionic language: python + python: - "3.6" diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Validation/Enable_FreProSta.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Validation/Enable_FreProSta.mo index 814e693d570..f3f6207a8d4 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Validation/Enable_FreProSta.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Validation/Enable_FreProSta.mo @@ -20,7 +20,7 @@ model Enable_FreProSta "Outdoor air temperature is slightly below the cutoff" annotation (Placement(transformation(extent={{-80,140},{-60,160}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TOutCut( - final k=TOutCutoff) + final k=TOutCutoff) "OA temperature high limit cutoff" annotation (Placement(transformation(extent={{-80,100},{-60,120}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant hOutBelowCutoff( final k=hOutCutoff - 1000) @@ -46,14 +46,16 @@ model Enable_FreProSta final k=0) "Minimal allowed economizer damper position" annotation (Placement(transformation(extent={{-110,-90},{-90,-70}}))); Buildings.Controls.OBC.CDL.Logical.Sources.Constant supFanSta(k=true) + "Supply fan status" annotation (Placement(transformation(extent={{-140,-40},{-120,-20}}))); Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul1(period=1800) + "Boolean pulse for generating freeze protection stage" annotation (Placement(transformation(extent={{-20,-160},{0,-140}}))); Buildings.Controls.OBC.CDL.Conversions.BooleanToInteger freProSta1( integerTrue=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.FreezeProtectionStages.stage0, integerFalse=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.FreezeProtectionStages.stage1) - "Freese protection stage changes from stage 0 to stage 1" + "Freeze protection stage changes from stage 0 to stage 1" annotation (Placement(transformation(extent={{20,-160},{40,-140}}))); equation diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Validation/Modulation_TSup.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Validation/Modulation_TSup.mo index 84c1946ba31..f90ed2e8bc0 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Validation/Modulation_TSup.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Validation/Modulation_TSup.mo @@ -13,13 +13,16 @@ model Modulation_TSup "Control signal for supply air temperature loop" annotation (Placement(transformation(extent={{-60,60},{-40,80}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant outDamPosMin( - final k=0.1) + final k=0.1) "Outdoor air damper minimum position" annotation (Placement(transformation(extent={{-80,-20},{-60,0}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant outDamPosMax(final k=0.8) + "Outdoor air damper maximum position" annotation (Placement(transformation(extent={{-80,16},{-60,36}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant retDamPosMin(final k=0.2) + "Return air damper minimum position" annotation (Placement(transformation(extent={{-80,-80},{-60,-60}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant retDamPosMax(final k=0.6) + "Return air damper maximum position" annotation (Placement(transformation(extent={{-80,-50},{-60,-30}}))); Buildings.Controls.OBC.ASHRAE.G36_PR1.AHUs.MultiZone.VAV.Economizers.Subsequences.Modulation @@ -35,25 +38,26 @@ model Modulation_TSup equation connect(retDamPosMax.y, mod.uRetDamPosMax) - annotation (Line(points={{-59,-40},{-20,-40},{-20,38},{39,38}},color={0,0,127})); + annotation (Line(points={{-58,-40},{-20,-40},{-20,39},{38,39}},color={0,0,127})); connect(retDamPosMin.y, mod.uRetDamPosMin) - annotation (Line(points={{-59,-70},{-10,-70},{-10,34},{39,34}},color={0,0,127})); + annotation (Line(points={{-58,-70},{-10,-70},{-10,35},{38,35}},color={0,0,127})); connect(outDamPosMax.y, mod.uOutDamPosMax) - annotation (Line(points={{-59,26},{39,26}},color={0,0,127})); + annotation (Line(points={{-58,26},{-10,26},{-10,25},{38,25}}, + color={0,0,127})); connect(outDamPosMin.y, mod.uOutDamPosMin) - annotation (Line(points={{-59,-10},{-34,-10},{-24,-10},{-24,22},{39,22}}, color={0,0,127})); + annotation (Line(points={{-58,-10},{-58,-10},{-24,-10},{-24,21},{38,21}}, color={0,0,127})); connect(uTSup.y, mod.uTSup) - annotation (Line(points={{-39,70},{0,70},{0,30},{39,30}}, color={0,0,127})); + annotation (Line(points={{-38,70},{0,70},{0,30},{38,30}}, color={0,0,127})); connect(retDamPosMax.y, modFre.uRetDamPosMax) - annotation (Line(points={{-59,-40},{-20,-40},{-20,-22},{39,-22}}, color={0,0,127})); + annotation (Line(points={{-58,-40},{-20,-40},{-20,-21},{38,-21}}, color={0,0,127})); connect(outDamPosMin.y, modFre.uOutDamPosMin) - annotation (Line(points={{-59,-10},{-34,-10},{-34,-38},{39,-38}}, color={0,0,127})); + annotation (Line(points={{-58,-10},{-34,-10},{-34,-39},{38,-39}}, color={0,0,127})); connect(uTSup.y, modFre.uTSup) - annotation (Line(points={{-39,70},{0,70},{0,-30},{39,-30}}, color={0,0,127})); + annotation (Line(points={{-38,70},{0,70},{0,-30},{38,-30}}, color={0,0,127})); connect(outDamPosMaxFre.y, modFre.uOutDamPosMax) - annotation (Line(points={{21,-70},{30,-70},{30,-34},{39,-34}}, color={0,0,127})); + annotation (Line(points={{22,-70},{30,-70},{30,-35},{38,-35}}, color={0,0,127})); connect(retDamPosMinFre.y, modFre.uRetDamPosMin) - annotation (Line(points={{25,0},{32,0},{32,-26},{39,-26}}, color={0,0,127})); + annotation (Line(points={{26,0},{32,0},{32,-25},{38,-25}}, color={0,0,127})); annotation ( experiment(StopTime=900.0, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Subsequences/Validation/Modulation_TSup.mos" diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Validation/Controller_Disable.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Validation/Controller_Disable.mo index b442089085f..3118f4fe5c6 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Validation/Controller_Disable.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Validation/Controller_Disable.mo @@ -102,7 +102,7 @@ protected amplitude=20, freqHz=1/1800, offset=272.15, - startTime=0) + startTime=0) "Mixed air temerature" annotation (Placement(transformation(extent={{90,-98},{110,-80}}))); equation diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Validation/Controller_Mod_DamLim.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Validation/Controller_Mod_DamLim.mo index 29b52b53906..2cff4b74a66 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Validation/Controller_Mod_DamLim.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/MultiZone/VAV/Economizers/Validation/Controller_Mod_DamLim.mo @@ -60,7 +60,7 @@ protected final k=TOutCutoff - 5) "Outdoor air temperature is slightly below the cutoff" annotation (Placement(transformation(extent={{-120,100},{-100,120}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TOutCut1( - final k=TOutCutoff) + final k=TOutCutoff) "OA temperature high limit cutoff" annotation (Placement(transformation(extent={{-120,60},{-100,80}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TMixMea( final k=303.15) diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Controller.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Controller.mo index e74f04d50dd..0e54ec484c5 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Controller.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Controller.mo @@ -261,7 +261,7 @@ block Controller final min=0, final max=1, final unit="1") = 1 - "Physically fixed maximum position of the outdoor air (OA) damper" + "Physically fixed maximum position of the outdoor air damper" annotation(Dialog(tab="Economizer", group="Commissioning")); parameter Real outDamPhyPosMin( final min=0, diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Enable.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Enable.mo index 9001bf60e4b..849fa2581a3 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Enable.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Enable.mo @@ -179,12 +179,14 @@ protected annotation (Placement(transformation(extent={{4,100},{24,120}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt( final k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.FreezeProtectionStages.stage0) + "Freeze protection stage 0" annotation (Placement(transformation(extent={{-120,30},{-100,50}}))); Buildings.Controls.OBC.CDL.Integers.Equal intEqu "Logical block to check if the freeze protection is deactivated" annotation (Placement(transformation(extent={{-80,50},{-60,70}}))); Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt1( final k=Buildings.Controls.OBC.ASHRAE.G36_PR1.Types.ZoneStates.heating) + "Heating zone state" annotation (Placement(transformation(extent={{-120,-30},{-100,-10}}))); Buildings.Controls.OBC.CDL.Integers.Equal intEqu1 "Logical block to check if the freeze protection is deactivated" diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Limits.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Limits.mo index 447f62f9026..c63b72062b6 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Limits.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Limits.mo @@ -48,7 +48,7 @@ block Limits "Single zone VAV AHU minimum outdoor air control - damper position final min=0, final max=1, final unit="1") = 1 - "Physically fixed maximum position of the outdoor air (OA) damper" + "Physically fixed maximum position of the outdoor air damper" annotation(Dialog(tab="Commissioning", group="Physical damper position limits")); parameter Real outDamPhyPosMin( final min=0, @@ -106,11 +106,11 @@ protected annotation (Placement(transformation(extent={{-140,50},{-120,70}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant outDamPhyPosMinSig( final k=outDamPhyPosMin) - "Physically fixed minimum position of the outdoor air (OA) damper" + "Physically fixed minimum position of the outdoor air damper" annotation (Placement(transformation(extent={{-40,-20},{-20,0}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant outDamPhyPosMaxSig( final k=outDamPhyPosMax) - "Physically fixed maximum position of the outdoor air (OA) damper" + "Physically fixed maximum position of the outdoor air damper" annotation (Placement(transformation(extent={{-80,-20},{-60,0}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant yFanMaxSig( final k=yFanMax) "Maximum supply fan speed" diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Validation/Enable_FreProSta_ZonSta.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Validation/Enable_FreProSta_ZonSta.mo index 7c750a6ea93..98521c176a1 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Validation/Enable_FreProSta_ZonSta.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Subsequences/Validation/Enable_FreProSta_ZonSta.mo @@ -60,7 +60,7 @@ protected "Minimal allowed economizer damper position" annotation (Placement(transformation(extent={{-60,-160},{-40,-140}}))); Buildings.Controls.OBC.CDL.Logical.Sources.Constant supFanSta( - final k=true) + final k=true) "Supply fan status" annotation (Placement(transformation(extent={{-160,-40},{-140,-20}}))); equation diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Validation/Controller_Disable.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Validation/Controller_Disable.mo index 6b16753b684..38edaeeed7d 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Validation/Controller_Disable.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Validation/Controller_Disable.mo @@ -96,7 +96,7 @@ protected "Outdoor air temperature is below the cutoff" annotation (Placement(transformation(extent={{-120,100},{-100,120}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TOutCut1( - final k=TOutCutoff) + final k=TOutCutoff) "Outdoor temperature high limit cutoff" annotation (Placement(transformation(extent={{-120,60},{-100,80}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp TSup( final height=4, @@ -118,7 +118,7 @@ protected amplitude=20, freqHz=1/1800, offset=272.15, - startTime=0) + startTime=0) "Mixed air temperature" annotation (Placement(transformation(extent={{140,-78},{160,-60}}))); equation diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Validation/Controller_Mod_DamLim.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Validation/Controller_Mod_DamLim.mo index 172870dabc8..dc01f656862 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Validation/Controller_Mod_DamLim.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/AHUs/SingleZone/VAV/Economizers/Validation/Controller_Mod_DamLim.mo @@ -85,7 +85,7 @@ protected "Outdoor air temperature is slightly below the cutoff" annotation (Placement(transformation(extent={{-120,100},{-100,120}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TOutCut1( - final k=TOutCutoff) + final k=TOutCutoff) "Outdoor temperature high limit cutoff" annotation (Placement(transformation(extent={{-120,60},{-100,80}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSupSetSig( final k=TSupSet) "Heating supply air temperature setpoint" diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/SetPoints/Validation/OperationMode.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/SetPoints/Validation/OperationMode.mo index a3f89733dfb..d79f647c512 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/SetPoints/Validation/OperationMode.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/SetPoints/Validation/OperationMode.mo @@ -36,8 +36,10 @@ model OperationMode "Validate block for selecting operation mode" Buildings.Controls.OBC.CDL.Continuous.Sources.TimeTable occTim( final table=[0,0; occSta,1; occEnd,0; 24*3600,0], final smoothness=Buildings.Controls.OBC.CDL.Types.Smoothness.ConstantSegments) + "Occupancy schedule" annotation (Placement(transformation(extent={{-140,50},{-120,70}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.ModelTime modTim + "Standard time" annotation (Placement(transformation(extent={{-160,230},{-140,250}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant con( final k=24*3600) "One day in second" diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/Validation/FreezeProtectionMixedAir.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/Validation/FreezeProtectionMixedAir.mo index 7c84299aa7c..4d4e1f20cb8 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/Validation/FreezeProtectionMixedAir.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/Generic/Validation/FreezeProtectionMixedAir.mo @@ -9,6 +9,7 @@ model FreezeProtectionMixedAir "Freeze protection set point temperature"; Buildings.Controls.OBC.ASHRAE.G36_PR1.Generic.FreezeProtectionMixedAir freProTMix(final TFreSet = TFreSet) + "Freeze protection signal based on mixed air temperature" annotation (Placement(transformation(extent={{0,0},{20,20}}))); CDL.Continuous.Sources.Sine sin1( diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/DamperValves.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/DamperValves.mo index 31492ae0d73..40791aa0164 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/DamperValves.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/DamperValves.mo @@ -338,7 +338,7 @@ protected Buildings.Controls.OBC.CDL.Logical.Switch swi6 "Output hot water valve position in case of low discharge air temperature" annotation (Placement(transformation(extent={{-30,-90},{-10,-70}}))); - Buildings.Controls.OBC.CDL.Logical.Or or2 + Buildings.Controls.OBC.CDL.Logical.Or or2 "Logical not" annotation (Placement(transformation(extent={{-68,-64},{-48,-44}}))); Buildings.Controls.OBC.CDL.Logical.Not not3 "Logical not" annotation (Placement(transformation(extent={{-120,120},{-100,140}}))); @@ -348,6 +348,7 @@ protected Buildings.Controls.OBC.CDL.Logical.Not not6 "Negation of input signal" annotation (Placement(transformation(extent={{-40,-192},{-20,-172}}))); Buildings.Controls.OBC.CDL.Logical.And and1 + "Check if it is not in heating mode and the discharge temperature is not too low" annotation (Placement(transformation(extent={{20,-56},{40,-36}}))); Buildings.Controls.OBC.CDL.Continuous.Add add3 "Active airflow setpoint" annotation (Placement(transformation(extent={{200,220},{220,240}}))); @@ -530,7 +531,7 @@ equation connect(isUno.y, not5.u) annotation (Line(points={{242,-312},{266,-312},{266,-280}, {180,-280},{180,-250},{198,-250}}, color={255,0,255})); connect(not5.y, conDam.trigger) annotation (Line(points={{222,-250},{232,-250}, - {232,170},{282,170},{282,178}}, color={255,0,255})); + {232,170},{284,170},{284,178}}, color={255,0,255})); connect(truHol2.y, or2.u2) annotation (Line(points={{-200,-210},{-88,-210},{-88, -62},{-70,-62}}, color={255,0,255})); connect(truDel3.y, not3.u) @@ -560,7 +561,7 @@ equation connect(not4.y, truDel3.u) annotation (Line(points={{-180,130},{-162,130}}, color={255,0,255})); connect(not5.y, conVal.trigger) annotation (Line(points={{222,-250},{232,-250}, - {232,-132},{36,-132},{36,-92}}, color={255,0,255})); + {232,-132},{38,-132},{38,-92}}, color={255,0,255})); connect(swi6.y, conVal.u_s) annotation (Line(points={{-8,-80},{32,-80}}, color={0,0,127})); connect(swi1.y, add4.u1) annotation (Line(points={{154,50},{168,50},{168,56},{ diff --git a/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/SystemRequests.mo b/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/SystemRequests.mo index 4b2fb77932b..d522ae26d08 100644 --- a/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/SystemRequests.mo +++ b/Buildings/Controls/OBC/ASHRAE/G36_PR1/TerminalUnits/Reheat/SystemRequests.mo @@ -351,6 +351,7 @@ protected "Output 0 or 1 request " annotation (Placement(transformation(extent={{100,-440},{120,-420}}))); Buildings.Controls.OBC.CDL.Logical.TrueHoldWithReset truHol(duration=samplePeriod) + "Hold true signal for sample period of time" annotation (Placement(transformation(extent={{120,330},{140,350}}))); Buildings.Controls.OBC.CDL.Logical.LogicalSwitch logSwi "Logical switch" annotation (Placement(transformation(extent={{120,300},{140,280}}))); diff --git a/Buildings/Controls/OBC/CDL/Constants.mo b/Buildings/Controls/OBC/CDL/Constants.mo index abf0106821c..ba9eb3c2f18 100644 --- a/Buildings/Controls/OBC/CDL/Constants.mo +++ b/Buildings/Controls/OBC/CDL/Constants.mo @@ -5,7 +5,8 @@ package Constants "Package with constants" "Biggest number such that 1.0 + eps = 1.0"; final constant Real small=1E-60 "Smallest number such that small and -small are representable on the machine"; - final constant Real pi=2*Modelica.Math.asin(1.0); // 3.14159265358979; + final constant Real pi=2*Modelica.Math.asin(1.0) + "Constant number pi, 3.14159265358979"; annotation ( Documentation(info=" diff --git a/Buildings/Controls/OBC/CDL/Continuous/MatrixMax.mo b/Buildings/Controls/OBC/CDL/Continuous/MatrixMax.mo index b133d45854d..baa01ba5648 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/MatrixMax.mo +++ b/Buildings/Controls/OBC/CDL/Continuous/MatrixMax.mo @@ -18,8 +18,9 @@ equation y = {max(u[i,:]) for i in 1:size(u, 1)}; else y = {max(u[:,i]) for i in 1:size(u, 2)}; - end if - annotation ( + end if; + +annotation ( defaultComponentName="matMax", Documentation(info="

diff --git a/Buildings/Controls/OBC/CDL/Continuous/MatrixMin.mo b/Buildings/Controls/OBC/CDL/Continuous/MatrixMin.mo index 0cb89721f78..a1bc5ce46e3 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/MatrixMin.mo +++ b/Buildings/Controls/OBC/CDL/Continuous/MatrixMin.mo @@ -18,8 +18,9 @@ equation y = {min(u[i,:]) for i in 1:size(u, 1)}; else y = {min(u[:,i]) for i in 1:size(u, 2)}; - end if - annotation ( + end if; + +annotation ( defaultComponentName="matMin", Documentation(info="

diff --git a/Buildings/Controls/OBC/CDL/Continuous/Validation/Derivative.mo b/Buildings/Controls/OBC/CDL/Continuous/Validation/Derivative.mo index 864cb3d11cb..54b159f21c2 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/Validation/Derivative.mo +++ b/Buildings/Controls/OBC/CDL/Continuous/Validation/Derivative.mo @@ -10,7 +10,7 @@ model Derivative "Validation model for the Derivative block" annotation (Placement(transformation(extent={{-60,-10},{-40,10}}))); Buildings.Controls.OBC.CDL.Continuous.Derivative der1( - y_start=-10) + y_start=-10) "Approximate the derivative of the input" annotation (Placement(transformation(extent={{40,-10},{60,10}}))); equation diff --git a/Buildings/Controls/OBC/CDL/Continuous/Validation/Greater.mo b/Buildings/Controls/OBC/CDL/Continuous/Validation/Greater.mo index a52c3d1db5a..bc8a6841e12 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/Validation/Greater.mo +++ b/Buildings/Controls/OBC/CDL/Continuous/Validation/Greater.mo @@ -12,14 +12,14 @@ model Greater "Validation model for the Greater block" annotation (Placement(transformation(extent={{-26,-32},{-6,-12}}))); Buildings.Controls.OBC.CDL.Continuous.Greater greater1 + "Check if the first input is greater than the second input" annotation (Placement(transformation(extent={{26,-10},{46,10}}))); equation connect(ramp1.y, greater1.u1) - annotation (Line(points={{-5,20},{8,20},{8,0},{24,0}}, color={0,0,127})); - connect(ramp2.y, greater1.u2) annotation (Line(points={{-5,-22},{10,-22},{10, - -8},{24,-8}}, - color={0,0,127})); + annotation (Line(points={{-4,20},{8,20},{8,0},{24,0}}, color={0,0,127})); + connect(ramp2.y, greater1.u2) annotation (Line(points={{-4,-22},{10,-22},{10,-8}, + {24,-8}}, color={0,0,127})); annotation ( experiment(StopTime=1.0, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/CDL/Continuous/Validation/Greater.mos" diff --git a/Buildings/Controls/OBC/CDL/Continuous/Validation/GreaterEqual.mo b/Buildings/Controls/OBC/CDL/Continuous/Validation/GreaterEqual.mo index 351e1ef6ee7..4bdf9ac2110 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/Validation/GreaterEqual.mo +++ b/Buildings/Controls/OBC/CDL/Continuous/Validation/GreaterEqual.mo @@ -12,12 +12,13 @@ model GreaterEqual "Validation model for the GreaterEqual block" annotation (Placement(transformation(extent={{-26,-30},{-6,-10}}))); Buildings.Controls.OBC.CDL.Continuous.GreaterEqual greEqu + "Check if the first input is greater than or equal to the second input" annotation (Placement(transformation(extent={{26,-8},{46,12}}))); equation connect(ramp1.y, greEqu.u1) - annotation (Line(points={{-5,22},{8,22},{8,2},{24,2}}, color={0,0,127})); - connect(ramp2.y, greEqu.u2) annotation (Line(points={{-5,-20},{10,-20},{10,-6}, + annotation (Line(points={{-4,22},{8,22},{8,2},{24,2}}, color={0,0,127})); + connect(ramp2.y, greEqu.u2) annotation (Line(points={{-4,-20},{10,-20},{10,-6}, {24,-6}}, color={0,0,127})); annotation ( experiment(StopTime=1.0, Tolerance=1e-06), diff --git a/Buildings/Controls/OBC/CDL/Continuous/Validation/GreaterEqualThreshold.mo b/Buildings/Controls/OBC/CDL/Continuous/Validation/GreaterEqualThreshold.mo index 2bdf8fb751e..722db54db23 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/Validation/GreaterEqualThreshold.mo +++ b/Buildings/Controls/OBC/CDL/Continuous/Validation/GreaterEqualThreshold.mo @@ -7,11 +7,12 @@ model GreaterEqualThreshold "Validation model for the GreaterEqualThreshold blo annotation (Placement(transformation(extent={{-26,-8},{-6,12}}))); Buildings.Controls.OBC.CDL.Continuous.GreaterEqualThreshold greEquThr + "Check if the input is greater than or equal to the threshold" annotation (Placement(transformation(extent={{26,-8},{46,12}}))); equation connect(ramp2.y, greEquThr.u) - annotation (Line(points={{-5,2},{8,2},{24,2}}, color={0,0,127})); + annotation (Line(points={{-4,2},{-4,2},{24,2}},color={0,0,127})); annotation ( experiment(StopTime=1.0, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/CDL/Continuous/Validation/GreaterEqualThreshold.mos" diff --git a/Buildings/Controls/OBC/CDL/Continuous/Validation/GreaterThreshold.mo b/Buildings/Controls/OBC/CDL/Continuous/Validation/GreaterThreshold.mo index aa930b1bc2e..6f39c41cd5d 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/Validation/GreaterThreshold.mo +++ b/Buildings/Controls/OBC/CDL/Continuous/Validation/GreaterThreshold.mo @@ -7,11 +7,12 @@ model GreaterThreshold "Validation model for the GreaterThreshold block" annotation (Placement(transformation(extent={{-26,-8},{-6,12}}))); Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr + "Check if the input is greater than the threshold" annotation (Placement(transformation(extent={{26,-8},{46,12}}))); equation connect(ramp2.y, greThr.u) - annotation (Line(points={{-5,2},{8,2},{24,2}}, color={0,0,127})); + annotation (Line(points={{-4,2},{-4,2},{24,2}},color={0,0,127})); annotation ( experiment(StopTime=1.0, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/CDL/Continuous/Validation/GreaterThreshold.mos" diff --git a/Buildings/Controls/OBC/CDL/Continuous/Validation/HysteresisWithHold.mo b/Buildings/Controls/OBC/CDL/Continuous/Validation/HysteresisWithHold.mo index 1bc18342868..b74a7fb3669 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/Validation/HysteresisWithHold.mo +++ b/Buildings/Controls/OBC/CDL/Continuous/Validation/HysteresisWithHold.mo @@ -2,7 +2,7 @@ within Buildings.Controls.OBC.CDL.Continuous.Validation; model HysteresisWithHold "Validation model for the HysteresisWithHold block" Modelica.Blocks.Sources.Sine pulse1( amplitude = 0.2, - freqHz = 1/360) + freqHz = 1/360) "Generate sine wave signal" annotation (Placement(transformation(extent={{-40,-10},{-20,10}}))); Buildings.Controls.OBC.CDL.Continuous.HysteresisWithHold noHold( trueHoldDuration = 0, diff --git a/Buildings/Controls/OBC/CDL/Continuous/Validation/Less.mo b/Buildings/Controls/OBC/CDL/Continuous/Validation/Less.mo index e5eddafbd22..13402d9a8fb 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/Validation/Less.mo +++ b/Buildings/Controls/OBC/CDL/Continuous/Validation/Less.mo @@ -12,12 +12,13 @@ model Less "Validation model for the Less block" annotation (Placement(transformation(extent={{-26,-30},{-6,-10}}))); Buildings.Controls.OBC.CDL.Continuous.Less less1 + "Check if the first input is less than the second input" annotation (Placement(transformation(extent={{26,-8},{46,12}}))); equation connect(ramp1.y, less1.u1) - annotation (Line(points={{-5,22},{8,22},{8,2},{24,2}}, color={0,0,127})); - connect(ramp2.y, less1.u2) annotation (Line(points={{-5,-20},{10,-20},{10,-6}, + annotation (Line(points={{-4,22},{8,22},{8,2},{24,2}}, color={0,0,127})); + connect(ramp2.y, less1.u2) annotation (Line(points={{-4,-20},{10,-20},{10,-6}, {24,-6}}, color={0,0,127})); annotation ( experiment(StopTime=1.0, Tolerance=1e-06), diff --git a/Buildings/Controls/OBC/CDL/Continuous/Validation/LessEqual.mo b/Buildings/Controls/OBC/CDL/Continuous/Validation/LessEqual.mo index ba466564859..f665fab873c 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/Validation/LessEqual.mo +++ b/Buildings/Controls/OBC/CDL/Continuous/Validation/LessEqual.mo @@ -12,12 +12,13 @@ model LessEqual "Validation model for the LessEqual block" annotation (Placement(transformation(extent={{-26,-30},{-6,-10}}))); Buildings.Controls.OBC.CDL.Continuous.LessEqual lesEqu + "Check if the first input is less than or equal to the second input" annotation (Placement(transformation(extent={{26,-8},{46,12}}))); equation connect(ramp1.y, lesEqu.u1) - annotation (Line(points={{-5,22},{8,22},{8,2},{24,2}}, color={0,0,127})); - connect(ramp2.y, lesEqu.u2) annotation (Line(points={{-5,-20},{10,-20},{10,-6}, + annotation (Line(points={{-4,22},{8,22},{8,2},{24,2}}, color={0,0,127})); + connect(ramp2.y, lesEqu.u2) annotation (Line(points={{-4,-20},{10,-20},{10,-6}, {24,-6}}, color={0,0,127})); annotation ( experiment(StopTime=1.0, Tolerance=1e-06), diff --git a/Buildings/Controls/OBC/CDL/Continuous/Validation/LessEqualThreshold.mo b/Buildings/Controls/OBC/CDL/Continuous/Validation/LessEqualThreshold.mo index e6ccd7d0d5e..646dd9bc3c4 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/Validation/LessEqualThreshold.mo +++ b/Buildings/Controls/OBC/CDL/Continuous/Validation/LessEqualThreshold.mo @@ -7,12 +7,14 @@ model LessEqualThreshold "Validation model for the LessEqualThreshold block" annotation (Placement(transformation(extent={{-36,-10},{-16,10}}))); Buildings.Controls.OBC.CDL.Continuous.LessEqualThreshold lesEquThr + "Check if the input is less than or equal to the threshold" annotation (Placement(transformation(extent={{16,-10},{36,10}}))); equation connect(ramp1.y, lesEquThr.u) - annotation (Line(points={{-15,0},{0,0},{14,0}}, color={0,0,127})); - annotation ( + annotation (Line(points={{-14,0},{-14,0},{14,0}}, color={0,0,127})); + +annotation ( experiment(StopTime=1.0, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/CDL/Continuous/Validation/LessEqualThreshold.mos" "Simulate and plot"), diff --git a/Buildings/Controls/OBC/CDL/Continuous/Validation/LessThreshold.mo b/Buildings/Controls/OBC/CDL/Continuous/Validation/LessThreshold.mo index ccb1bde76f9..db491e1d2ac 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/Validation/LessThreshold.mo +++ b/Buildings/Controls/OBC/CDL/Continuous/Validation/LessThreshold.mo @@ -6,13 +6,15 @@ model LessThreshold "Validation model for the LessThreshold block" height=4) "Block that generates ramp signal" annotation (Placement(transformation(extent={{-36,-10},{-16,10}}))); - Buildings.Controls.OBC.CDL.Continuous.LessEqualThreshold lesThr + Buildings.Controls.OBC.CDL.Continuous.LessThreshold lesThr + "Check if the input is less than the threshold" annotation (Placement(transformation(extent={{16,-10},{36,10}}))); equation connect(ramp1.y, lesThr.u) - annotation (Line(points={{-15,0},{0,0},{14,0}}, color={0,0,127})); - annotation ( + annotation (Line(points={{-14,0},{-14,0},{14,0}}, color={0,0,127})); + +annotation ( experiment(StopTime=1.0, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/CDL/Continuous/Validation/LessThreshold.mos" "Simulate and plot"), diff --git a/Buildings/Controls/OBC/CDL/Continuous/Validation/LimPID.mo b/Buildings/Controls/OBC/CDL/Continuous/Validation/LimPID.mo index 35221504d4f..e3528a4c737 100644 --- a/Buildings/Controls/OBC/CDL/Continuous/Validation/LimPID.mo +++ b/Buildings/Controls/OBC/CDL/Continuous/Validation/LimPID.mo @@ -1,20 +1,22 @@ within Buildings.Controls.OBC.CDL.Continuous.Validation; model LimPID "Test model for LimPID controller" Buildings.Controls.OBC.CDL.Continuous.Sources.Pulse pulse(period=0.25) + "Setpoint" annotation (Placement(transformation(extent={{-90,14},{-70,34}}))); Buildings.Controls.OBC.CDL.Continuous.LimPID limPID( controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PID, Ti=1, Td=1, - yMin=-1) + yMin=-1) "PID controller" annotation (Placement(transformation(extent={{-30,40},{-10,60}}))); Buildings.Controls.OBC.CDL.Continuous.LimPID limPIDOri( controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PID, Ti=1, Td=1, - yMin=-1) + yMin=-1) "PID controller" annotation (Placement(transformation(extent={{-30,74},{-10,94}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant const(k=0.5) + "Measurement data" annotation (Placement(transformation(extent={{-90,-22},{-70,-2}}))); Buildings.Controls.OBC.CDL.Continuous.LimPID limPI( @@ -22,6 +24,7 @@ model LimPID "Test model for LimPID controller" Td=1, yMin=-1, controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI) + "PI controller" annotation (Placement(transformation(extent={{-30,2},{-10,22}}))); Buildings.Controls.OBC.CDL.Continuous.LimPID limPD( @@ -29,6 +32,7 @@ model LimPID "Test model for LimPID controller" Td=1, yMin=-1, controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PD) + "PD controller" annotation (Placement(transformation(extent={{-30,-30},{-10,-10}}))); Buildings.Controls.OBC.CDL.Continuous.LimPID limP( @@ -36,6 +40,7 @@ model LimPID "Test model for LimPID controller" Td=1, yMin=-1, controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.P) + "P controller" annotation (Placement(transformation(extent={{-30,-60},{-10,-40}}))); Buildings.Controls.OBC.CDL.Continuous.LimPID noLimPID( @@ -44,6 +49,7 @@ model LimPID "Test model for LimPID controller" yMax=1e15, yMin=-1e15, controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PID) + "PID controller with no output limit" annotation (Placement(transformation(extent={{-30,-90},{-10,-70}}))); equation diff --git a/Buildings/Controls/OBC/CDL/Integers/Validation/Change.mo b/Buildings/Controls/OBC/CDL/Integers/Validation/Change.mo index d71ef368186..ee277566999 100644 --- a/Buildings/Controls/OBC/CDL/Integers/Validation/Change.mo +++ b/Buildings/Controls/OBC/CDL/Integers/Validation/Change.mo @@ -1,6 +1,7 @@ within Buildings.Controls.OBC.CDL.Integers.Validation; model Change "Validation model for the Change block" Buildings.Controls.OBC.CDL.Integers.Change cha + "Check if the integer input changes value" annotation (Placement(transformation(extent={{0,-50},{20,-30}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp2( offset=0, @@ -27,25 +28,25 @@ model Change "Validation model for the Change block" equation connect(ramp2.y, changeSampler.u) - annotation (Line(points={{-19,30},{58,30}}, color={0,0,127})); + annotation (Line(points={{-18,30},{58,30}}, color={0,0,127})); connect(timTabLin.y[1], reaToInt.u) - annotation (Line(points={{-59,-40},{-42,-40}}, color={0,0,127})); + annotation (Line(points={{-58,-40},{-42,-40}}, color={0,0,127})); connect(reaToInt.y, cha.u) - annotation (Line(points={{-19,-40},{-2,-40}}, color={255,127,0})); + annotation (Line(points={{-18,-40},{-2,-40}}, color={255,127,0})); connect(ramp2.y, increaseSampler.u) - annotation (Line(points={{-19,30},{40,30},{40,70},{58,70}}, + annotation (Line(points={{-18,30},{40,30},{40,70},{58,70}}, color={0,0,127})); connect(ramp2.y, decreaseSampler.u) - annotation (Line(points={{-19,30},{40,30},{40,-10},{58,-10}}, + annotation (Line(points={{-18,30},{40,30},{40,-10},{58,-10}}, color={0,0,127})); connect(cha.up, increaseSampler.trigger) - annotation (Line(points={{21,-34},{30,-34},{30,52},{70,52},{70,58.2}}, + annotation (Line(points={{22,-34},{30,-34},{30,52},{70,52},{70,58.2}}, color={255,0,255})); connect(cha.y, changeSampler.trigger) - annotation (Line(points={{21,-40},{46,-40},{46,12},{70,12},{70,18.2}}, + annotation (Line(points={{22,-40},{46,-40},{46,12},{70,12},{70,18.2}}, color={255,0,255})); connect(cha.down, decreaseSampler.trigger) - annotation (Line(points={{21,-46},{70,-46},{70,-21.8}}, color={255,0,255})); + annotation (Line(points={{22,-46},{70,-46},{70,-21.8}}, color={255,0,255})); annotation ( experiment(StopTime=1.0, Tolerance=1e-06), diff --git a/Buildings/Controls/OBC/CDL/Logical/FallingEdge.mo b/Buildings/Controls/OBC/CDL/Logical/FallingEdge.mo index c6c40afaf0f..90e0276ba0f 100644 --- a/Buildings/Controls/OBC/CDL/Logical/FallingEdge.mo +++ b/Buildings/Controls/OBC/CDL/Logical/FallingEdge.mo @@ -11,7 +11,7 @@ block FallingEdge annotation (Placement(transformation(extent={{100,-20},{140,20}}))); protected - Boolean not_u=not u; + Boolean not_u=not u "Boolean not of the input"; initial equation pre(not_u) = not pre_u_start; diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/And.mo b/Buildings/Controls/OBC/CDL/Logical/Validation/And.mo index 0a2d51e6592..17890dfce06 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/And.mo +++ b/Buildings/Controls/OBC/CDL/Logical/Validation/And.mo @@ -9,13 +9,13 @@ model And "Validation model for the And block" width=0.5, period=5) "Block that outputs cyclic on and off" annotation (Placement(transformation(extent={{-26,-26},{-6,-6}}))); - Buildings.Controls.OBC.CDL.Logical.And and1 + Buildings.Controls.OBC.CDL.Logical.And and1 "Logical and" annotation (Placement(transformation(extent={{26,-8},{46,12}}))); equation - connect(booPul2.y, and1.u2) annotation (Line(points={{-5,-16},{8,-16},{8,-6}, + connect(booPul2.y, and1.u2) annotation (Line(points={{-4,-16},{8,-16},{8,-6}, {24,-6}}, color={255,0,255})); - connect(booPul1.y, and1.u1) annotation (Line(points={{-5,18},{10,18},{10,2},{ + connect(booPul1.y, and1.u1) annotation (Line(points={{-4,18},{10,18},{10,2},{ 24,2}}, color={255,0,255})); annotation ( experiment(StopTime=10.0, Tolerance=1e-06), diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/And3.mo b/Buildings/Controls/OBC/CDL/Logical/Validation/And3.mo index 9c7cfa8a3cf..5f62fdcb7c4 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/And3.mo +++ b/Buildings/Controls/OBC/CDL/Logical/Validation/And3.mo @@ -9,18 +9,18 @@ model And3 "Validation model for the And3 block" width=0.5, period=5) "Block that outputs cyclic on and off" annotation (Placement(transformation(extent={{-26,-10},{-6,10}}))); - Buildings.Controls.OBC.CDL.Logical.And3 and1 + Buildings.Controls.OBC.CDL.Logical.And3 and1 "Logical and of three inputs" annotation (Placement(transformation(extent={{26,-10},{46,10}}))); Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul3( width=0.5, period=3) "Block that outputs cyclic on and off" annotation (Placement(transformation(extent={{-26,-44},{-6,-24}}))); equation - connect(booPul1.y, and1.u1) annotation (Line(points={{-5,34},{8,34},{8,8},{24, + connect(booPul1.y, and1.u1) annotation (Line(points={{-4,34},{8,34},{8,8},{24, 8}}, color={255,0,255})); connect(booPul2.y, and1.u2) - annotation (Line(points={{-5,0},{10,0},{24,0}}, color={255,0,255})); - connect(booPul3.y, and1.u3) annotation (Line(points={{-5,-34},{8,-34},{8,-8}, + annotation (Line(points={{-4,0},{-4,0},{24,0}}, color={255,0,255})); + connect(booPul3.y, and1.u3) annotation (Line(points={{-4,-34},{8,-34},{8,-8}, {24,-8}},color={255,0,255})); annotation ( experiment(StopTime=10.0, Tolerance=1e-06), diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/FallingEdge.mo b/Buildings/Controls/OBC/CDL/Logical/Validation/FallingEdge.mo index 85401c14a6e..b330e87c3d9 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/FallingEdge.mo +++ b/Buildings/Controls/OBC/CDL/Logical/Validation/FallingEdge.mo @@ -6,6 +6,7 @@ model FallingEdge "Validation model for the falling edge block" annotation (Placement(transformation(extent={{-40,-10},{-20,10}}))); Buildings.Controls.OBC.CDL.Logical.FallingEdge falEdg + "Output true when input changes from true to false" annotation (Placement(transformation(extent={{0,-10},{20,10}}))); Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp ramp2( @@ -15,15 +16,16 @@ model FallingEdge "Validation model for the falling edge block" annotation (Placement(transformation(extent={{0,40},{20,60}}))); Buildings.Controls.OBC.CDL.Discrete.TriggeredSampler triggeredSampler + "Trigger sampling of continuous signal" annotation (Placement(transformation(extent={{40,40},{60,60}}))); equation connect(booPul.y, falEdg.u) - annotation (Line(points={{-19,0},{-10,0},{-2,0}}, + annotation (Line(points={{-18,0},{-18,0},{-2,0}}, color={255,0,255})); connect(ramp2.y, triggeredSampler.u) - annotation (Line(points={{21,50},{29.5,50},{38,50}}, color={0,0,127})); - connect(falEdg.y, triggeredSampler.trigger) annotation (Line(points={{21,0},{ - 36,0},{50,0},{50,38.2}}, color={255,0,255})); + annotation (Line(points={{22,50},{22,50},{38,50}}, color={0,0,127})); + connect(falEdg.y, triggeredSampler.trigger) annotation (Line(points={{22,0},{ + 22,0},{50,0},{50,38.2}}, color={255,0,255})); annotation ( experiment(StopTime=5.0, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/CDL/Logical/Validation/FallingEdge.mos" diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/LogicalSwitch.mo b/Buildings/Controls/OBC/CDL/Logical/Validation/LogicalSwitch.mo index fb9880f7551..46c26a7de1a 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/LogicalSwitch.mo +++ b/Buildings/Controls/OBC/CDL/Logical/Validation/LogicalSwitch.mo @@ -14,15 +14,18 @@ model LogicalSwitch "Validation model for the LogicalSwitch block" annotation (Placement(transformation(extent={{-26,-46},{-6,-26}}))); Buildings.Controls.OBC.CDL.Logical.LogicalSwitch logicalSwitch + "Switch between two boolean inputs" annotation (Placement(transformation(extent={{26,-10},{46,10}}))); equation connect(booPul2.y, logicalSwitch.u2) - annotation (Line(points={{-5,0},{10,0},{24,0}}, color={255,0,255})); - connect(booPul1.y, logicalSwitch.u1) annotation (Line(points={{-5,34},{10,34},{10, - 8},{24,8}}, color={255,0,255})); - connect(booPul3.y, logicalSwitch.u3) annotation (Line(points={{-5,-36},{10,-36}, - {10,-8},{24,-8}}, color={255,0,255})); + annotation (Line(points={{-4,0},{-4,0},{24,0}}, color={255,0,255})); + connect(booPul1.y, logicalSwitch.u1) annotation (Line(points={{-4,34},{10,34}, + {10,8},{24,8}}, + color={255,0,255})); + connect(booPul3.y, logicalSwitch.u3) annotation (Line(points={{-4,-36},{10, + -36},{10,-8},{24,-8}}, + color={255,0,255})); annotation ( experiment(StopTime=5.0, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/CDL/Logical/Validation/LogicalSwitch.mos" diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/MultiAnd.mo b/Buildings/Controls/OBC/CDL/Logical/Validation/MultiAnd.mo index 5f09a4e19e0..b1a67eb91aa 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/MultiAnd.mo +++ b/Buildings/Controls/OBC/CDL/Logical/Validation/MultiAnd.mo @@ -2,6 +2,7 @@ within Buildings.Controls.OBC.CDL.Logical.Validation; model MultiAnd "Model to validate the application of MultiAnd block" Buildings.Controls.OBC.CDL.Logical.MultiAnd mulAnd0 + "Logical and with multiple inputs: 0 input" annotation (Placement(transformation(extent={{40,60},{60,80}}))); Buildings.Controls.OBC.CDL.Logical.MultiAnd mulAnd1(nu=1) @@ -37,22 +38,28 @@ model MultiAnd "Model to validate the application of MultiAnd block" annotation (Placement(transformation(extent={{-60,-70},{-40,-50}}))); equation - connect(booPul1.y, mulAnd5.u[1]) annotation (Line(points={{-39,60},{-39,60},{20, - 60},{20,-24.4},{38,-24.4}}, color={255,0,255})); - connect(booPul2.y, mulAnd5.u[2]) annotation (Line(points={{-39,30},{14,30},{14, - -27.2},{38,-27.2}}, color={255,0,255})); - connect(booPul3.y, mulAnd5.u[3]) annotation (Line(points={{-39,0},{0,0},{0,-30}, - {38,-30}}, color={255,0,255})); - connect(booPul4.y, mulAnd5.u[4]) annotation (Line(points={{-39,-30},{-39,-30}, + connect(booPul1.y, mulAnd5.u[1]) annotation (Line(points={{-38,60},{-38,60},{ + 20,60},{20,-24.4},{38,-24.4}}, + color={255,0,255})); + connect(booPul2.y, mulAnd5.u[2]) annotation (Line(points={{-38,30},{14,30},{ + 14,-27.2},{38,-27.2}}, + color={255,0,255})); + connect(booPul3.y, mulAnd5.u[3]) annotation (Line(points={{-38,0},{0,0},{0, + -30},{38,-30}}, + color={255,0,255})); + connect(booPul4.y, mulAnd5.u[4]) annotation (Line(points={{-38,-30},{-38,-30}, {-4,-30},{-4,-32},{-4,-32},{-4,-32.8},{38,-32.8}}, color={255,0,255})); - connect(booPul5.y, mulAnd5.u[5]) annotation (Line(points={{-39,-60},{-39,-60}, + connect(booPul5.y, mulAnd5.u[5]) annotation (Line(points={{-38,-60},{-38,-60}, {20,-60},{20,-35.6},{38,-35.6}}, color={255,0,255})); - connect(booPul1.y, mulAnd2.u[1]) annotation (Line(points={{-39,60},{-39,60},{20, - 60},{20,3.5},{38,3.5}}, color={255,0,255})); - connect(booPul2.y, mulAnd2.u[2]) annotation (Line(points={{-39,30},{-39,30},{14, - 30},{14,-3.5},{38,-3.5}}, color={255,0,255})); - connect(booPul1.y, mulAnd1.u[1]) annotation (Line(points={{-39,60},{20,60},{20, - 30},{38,30}}, color={255,0,255})); + connect(booPul1.y, mulAnd2.u[1]) annotation (Line(points={{-38,60},{-38,60},{ + 20,60},{20,3.5},{38,3.5}}, + color={255,0,255})); + connect(booPul2.y, mulAnd2.u[2]) annotation (Line(points={{-38,30},{-38,30},{ + 14,30},{14,-3.5},{38,-3.5}}, + color={255,0,255})); + connect(booPul1.y, mulAnd1.u[1]) annotation (Line(points={{-38,60},{20,60},{ + 20,30},{38,30}}, + color={255,0,255})); annotation ( experiment(StopTime=10.0, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/CDL/Logical/Validation/MultiAnd.mos" diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/Nand.mo b/Buildings/Controls/OBC/CDL/Logical/Validation/Nand.mo index d128ce7692e..f29bd19ee92 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/Nand.mo +++ b/Buildings/Controls/OBC/CDL/Logical/Validation/Nand.mo @@ -9,13 +9,14 @@ model Nand "Validation model for the Nand block" annotation (Placement(transformation(extent={{-26,-26},{-6,-6}}))); Buildings.Controls.OBC.CDL.Logical.Nand nand1 + "Outputs true if at least one input is false" annotation (Placement(transformation(extent={{26,-8},{46,12}}))); equation - connect(booPul2.y, nand1.u2) annotation (Line(points={{-5,-16},{8,-16},{8,-6}, + connect(booPul2.y, nand1.u2) annotation (Line(points={{-4,-16},{8,-16},{8,-6}, {24,-6}}, color={255,0,255})); - connect(booPul1.y, nand1.u1) annotation (Line(points={{-5,18},{10,18},{10,2},{ - 24,2}}, color={255,0,255})); + connect(booPul1.y, nand1.u1) annotation (Line(points={{-4,18},{10,18},{10,2}, + {24,2}},color={255,0,255})); annotation ( experiment(StopTime=5.0, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/CDL/Logical/Validation/Nand.mos" diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/Nor.mo b/Buildings/Controls/OBC/CDL/Logical/Validation/Nor.mo index 22dea5ede45..75a4fb8520c 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/Nor.mo +++ b/Buildings/Controls/OBC/CDL/Logical/Validation/Nor.mo @@ -9,12 +9,13 @@ model Nor "Validation model for the Nor block" width=0.5, period=5) "Block that outputs cyclic on and off" annotation (Placement(transformation(extent={{-26,-26},{-6,-6}}))); Buildings.Controls.OBC.CDL.Logical.Nor nor1 + "Outputs true if none of the inputs is true, otherwise outputs false" annotation (Placement(transformation(extent={{26,-8},{46,12}}))); equation - connect(booPul2.y, nor1.u2) annotation (Line(points={{-5,-16},{8,-16},{8,-6}, + connect(booPul2.y, nor1.u2) annotation (Line(points={{-4,-16},{8,-16},{8,-6}, {24,-6}}, color={255,0,255})); - connect(booPul1.y, nor1.u1) annotation (Line(points={{-5,18},{10,18},{10,2},{ + connect(booPul1.y, nor1.u1) annotation (Line(points={{-4,18},{10,18},{10,2},{ 24,2}}, color={255,0,255})); annotation ( experiment(StopTime=5.0, Tolerance=1e-06), diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/Not.mo b/Buildings/Controls/OBC/CDL/Logical/Validation/Not.mo index 9bd5ec03aee..7b6cc101a51 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/Not.mo +++ b/Buildings/Controls/OBC/CDL/Logical/Validation/Not.mo @@ -5,11 +5,12 @@ model Not "Validation model for the Not block" width=0.5, period=1.5) "Block that outputs cyclic on and off" annotation (Placement(transformation(extent={{-26,-10},{-6,10}}))); Buildings.Controls.OBC.CDL.Logical.Not not1 + "Output true when input is false and output false when input is true" annotation (Placement(transformation(extent={{26,-10},{46,10}}))); equation connect(booPul.y, not1.u) - annotation (Line(points={{-5,0},{8,0},{24,0}}, color={255,0,255})); + annotation (Line(points={{-4,0},{-4,0},{24,0}},color={255,0,255})); annotation ( experiment(StopTime=5.0, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/CDL/Logical/Validation/Not.mos" diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/Or.mo b/Buildings/Controls/OBC/CDL/Logical/Validation/Or.mo index b0764b2f579..a98613812d1 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/Or.mo +++ b/Buildings/Controls/OBC/CDL/Logical/Validation/Or.mo @@ -8,12 +8,13 @@ model Or "Validation model for the Or block" width=0.5, period=3) "Block that outputs cyclic on and off" annotation (Placement(transformation(extent={{-26,-26},{-6,-6}}))); Buildings.Controls.OBC.CDL.Logical.Or or1 + "Output true if at least one input is true" annotation (Placement(transformation(extent={{26,-8},{46,12}}))); equation - connect(booPul2.y, or1.u2) annotation (Line(points={{-5,-16},{8,-16},{8,-6}, - {24,-6}}, color={255,0,255})); - connect(booPul1.y, or1.u1) annotation (Line(points={{-5,18},{10,18},{10,2},{ + connect(booPul2.y, or1.u2) annotation (Line(points={{-4,-16},{8,-16},{8,-6},{ + 24,-6}}, color={255,0,255})); + connect(booPul1.y, or1.u1) annotation (Line(points={{-4,18},{10,18},{10,2},{ 24,2}}, color={255,0,255})); annotation ( experiment(StopTime=10.0, Tolerance=1e-06), diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/Or3.mo b/Buildings/Controls/OBC/CDL/Logical/Validation/Or3.mo index a274de47ffb..52b858fc17e 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/Or3.mo +++ b/Buildings/Controls/OBC/CDL/Logical/Validation/Or3.mo @@ -8,18 +8,21 @@ model Or3 "Validation model for the Or3 block" width=0.5, period=3) "Block that outputs cyclic on and off" annotation (Placement(transformation(extent={{-26,-8},{-6,12}}))); Buildings.Controls.OBC.CDL.Logical.Or3 or1 + "Output true if at least one input is true" annotation (Placement(transformation(extent={{26,-8},{46,12}}))); Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul3( width=0.5, period=5) "Block that outputs cyclic on and off" annotation (Placement(transformation(extent={{-26,-42},{-6,-22}}))); equation - connect(booPul3.y, or1.u3) annotation (Line(points={{-5,-32},{8,-32},{8,-6},{24, - -6}}, color={255,0,255})); + connect(booPul3.y, or1.u3) annotation (Line(points={{-4,-32},{8,-32},{8,-6},{ + 24,-6}}, + color={255,0,255})); connect(booPul2.y, or1.u2) - annotation (Line(points={{-5,2},{9.5,2},{24,2}}, color={255,0,255})); - connect(booPul1.y, or1.u1) annotation (Line(points={{-5,36},{10,36},{10,10},{24, - 10}}, color={255,0,255})); + annotation (Line(points={{-4,2},{-4,2},{24,2}}, color={255,0,255})); + connect(booPul1.y, or1.u1) annotation (Line(points={{-4,36},{10,36},{10,10},{ + 24,10}}, + color={255,0,255})); annotation ( experiment(StopTime=10.0, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/CDL/Logical/Validation/Or3.mos" diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/Switch.mo b/Buildings/Controls/OBC/CDL/Logical/Validation/Switch.mo index f79d4483732..2c41d3bcb60 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/Switch.mo +++ b/Buildings/Controls/OBC/CDL/Logical/Validation/Switch.mo @@ -15,15 +15,16 @@ model Switch "Validation model for the Switch block" width=0.5, period=2) "Block that outputs cyclic on and off" annotation (Placement(transformation(extent={{-26,-10},{-6,10}}))); Buildings.Controls.OBC.CDL.Logical.Switch switch1 + "Switch between two real inputs" annotation (Placement(transformation(extent={{26,-10},{46,10}}))); equation connect(booPul.y, switch1.u2) - annotation (Line(points={{-5,0},{10,0},{24,0}}, color={255,0,255})); - connect(ramp2.y, switch1.u3) annotation (Line(points={{-5,-32},{8,-32},{8,-8}, + annotation (Line(points={{-4,0},{-4,0},{24,0}}, color={255,0,255})); + connect(ramp2.y, switch1.u3) annotation (Line(points={{-4,-32},{8,-32},{8,-8}, {24,-8}}, color={0,0,127})); connect(ramp1.y, switch1.u1) - annotation (Line(points={{-5,32},{8,32},{8,8},{24,8}}, color={0,0,127})); + annotation (Line(points={{-4,32},{8,32},{8,8},{24,8}}, color={0,0,127})); annotation ( experiment(StopTime=5.0, Tolerance=1e-06), __Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Controls/OBC/CDL/Logical/Validation/Switch.mos" diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/Timer.mo b/Buildings/Controls/OBC/CDL/Logical/Validation/Timer.mo index d0fc578771e..da0c8ca09ad 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/Timer.mo +++ b/Buildings/Controls/OBC/CDL/Logical/Validation/Timer.mo @@ -26,9 +26,10 @@ model Timer "Validation model for the Timer block" "Block that outputs cyclic on and off" annotation (Placement(transformation(extent={{-40,30},{-20,50}}))); Buildings.Controls.OBC.CDL.Continuous.GreaterEqualThreshold greEquThr( - final threshold=1.5) + final threshold=1.5) "Output true when input is greater than threshold" annotation (Placement(transformation(extent={{-80,-80},{-60,-60}}))); Buildings.Controls.OBC.CDL.Logical.Pre pre + "Returns the value of the input signal from the last event iteration" annotation (Placement(transformation(extent={{-40,-80},{-20,-60}}))); Buildings.Controls.OBC.CDL.Logical.Sources.Pulse booPul( final width=0.5, diff --git a/Buildings/Controls/OBC/CDL/Logical/Validation/Xor.mo b/Buildings/Controls/OBC/CDL/Logical/Validation/Xor.mo index 4ddb8a244f9..e3e7eee9345 100644 --- a/Buildings/Controls/OBC/CDL/Logical/Validation/Xor.mo +++ b/Buildings/Controls/OBC/CDL/Logical/Validation/Xor.mo @@ -10,12 +10,13 @@ model Xor "Validation model for the Xor block" annotation (Placement(transformation(extent={{-26,-26},{-6,-6}}))); Buildings.Controls.OBC.CDL.Logical.Xor xor1 + "Outputs true if exactly one input is true" annotation (Placement(transformation(extent={{26,-8},{46,12}}))); equation - connect(booPul2.y, xor1.u2) annotation (Line(points={{-5,-16},{8,-16},{8,-6}, + connect(booPul2.y, xor1.u2) annotation (Line(points={{-4,-16},{8,-16},{8,-6}, {24,-6}}, color={255,0,255})); - connect(booPul1.y, xor1.u1) annotation (Line(points={{-5,18},{10,18},{10,2},{ + connect(booPul1.y, xor1.u1) annotation (Line(points={{-4,18},{10,18},{10,2},{ 24,2}}, color={255,0,255})); annotation ( experiment(StopTime=5.0, Tolerance=1e-06), diff --git a/Buildings/Controls/OBC/CDL/Logical/ZeroCrossing.mo b/Buildings/Controls/OBC/CDL/Logical/ZeroCrossing.mo index 581f4827a26..20e39467b29 100644 --- a/Buildings/Controls/OBC/CDL/Logical/ZeroCrossing.mo +++ b/Buildings/Controls/OBC/CDL/Logical/ZeroCrossing.mo @@ -1,7 +1,7 @@ within Buildings.Controls.OBC.CDL.Logical; block ZeroCrossing "Trigger zero crossing of input u" - Interfaces.RealInput u + Interfaces.RealInput u "Connector of Real input signal" annotation (Placement(transformation(extent={{-140,-20},{-100,20}}))); Interfaces.BooleanOutput y "Connector of Boolean output signal" @@ -15,8 +15,8 @@ block ZeroCrossing "Trigger zero crossing of input u" rotation=90))); protected - Boolean disable=not enable; - Boolean u_pos; + Boolean disable=not enable "Boolean not of enable input"; + Boolean u_pos "Positive real input"; initial equation pre(u_pos) = false; pre(enable) = false; diff --git a/Buildings/Controls/OBC/CDL/Psychrometrics/TDewPoi_TDryBulPhi.mo b/Buildings/Controls/OBC/CDL/Psychrometrics/TDewPoi_TDryBulPhi.mo index 0ef2f70b0bb..aaf28200836 100644 --- a/Buildings/Controls/OBC/CDL/Psychrometrics/TDewPoi_TDryBulPhi.mo +++ b/Buildings/Controls/OBC/CDL/Psychrometrics/TDewPoi_TDryBulPhi.mo @@ -25,13 +25,12 @@ block TDewPoi_TDryBulPhi protected Modelica.SIunits.Pressure p_w(displayUnit="Pa") "Water vapor pressure"; - constant Real C14=6.54; - constant Real C15=14.526; - constant Real C16=0.7389; - constant Real C17=0.09486; - constant Real C18=0.4569; - Real alpha; - + constant Real C14=6.54 "Constant used in the equation"; + constant Real C15=14.526 "Constant used in the equation"; + constant Real C16=0.7389 "Constant used in the equation"; + constant Real C17=0.09486 "Constant used in the equation"; + constant Real C18=0.4569 "Constant used in the equation"; + Real alpha "Variable used in the equation"; equation p_w = phi * Buildings.Utilities.Psychrometrics.Functions.saturationPressure(TDryBul); diff --git a/Buildings/Controls/OBC/CDL/Psychrometrics/Validation/TDewPoi_TDryBulPhi.mo b/Buildings/Controls/OBC/CDL/Psychrometrics/Validation/TDewPoi_TDryBulPhi.mo index 138bde205ab..604889ba131 100644 --- a/Buildings/Controls/OBC/CDL/Psychrometrics/Validation/TDewPoi_TDryBulPhi.mo +++ b/Buildings/Controls/OBC/CDL/Psychrometrics/Validation/TDewPoi_TDryBulPhi.mo @@ -27,26 +27,31 @@ model TDewPoi_TDryBulPhi annotation (Placement(transformation(extent={{-94,-60},{-74,-40}}))); // ============ Below blocks are from Buildings Library ============ - Buildings.Utilities.Psychrometrics.TDewPoi_pW TDewPoi + Buildings.Utilities.Psychrometrics.TDewPoi_pW TDewPoi "Dew point temperature" annotation (Placement(transformation(extent={{18,4},{38,24}}))); - Buildings.Utilities.Psychrometrics.X_pTphi X_pTphi + Buildings.Utilities.Psychrometrics.X_pTphi X_pTphi "Steam mass fraction" annotation (Placement(transformation(extent={{-46,4},{-26,24}}))); Buildings.Utilities.Psychrometrics.pW_X humRat(use_p_in=false) + "Water vapor pressure" annotation (Placement(transformation(extent={{-12,4},{8,24}}))); // =================================================================== Buildings.Controls.OBC.CDL.Continuous.Add add(k2=-1) + "Dew point temperature difference" annotation (Placement(transformation(extent={{52,40},{72,60}}))); Buildings.Controls.OBC.CDL.Psychrometrics.TDewPoi_TDryBulPhi dewBulPhi1 "Model for dew point temperature" annotation (Placement(transformation(extent={{18,-28},{38,-8}}))); Buildings.Utilities.Psychrometrics.TDewPoi_pW TDewPoi1 + "Dew point temperature" annotation (Placement(transformation(extent={{20,-98},{40,-78}}))); Buildings.Utilities.Psychrometrics.pW_X humRat1(use_p_in=false) + "Water vapor pressure" annotation (Placement(transformation(extent={{-10,-98},{10,-78}}))); - Buildings.Utilities.Psychrometrics.X_pTphi X_pTphi1 + Buildings.Utilities.Psychrometrics.X_pTphi X_pTphi1 "Steam mass fraction" annotation (Placement(transformation(extent={{-44,-98},{-24,-78}}))); Controls.OBC.CDL.Continuous.Add add1(k2=-1) + "Dew point temperature difference" annotation (Placement(transformation(extent={{52,-60},{72,-40}}))); equation @@ -57,46 +62,46 @@ equation annotation (Line(points={{-25,14},{-22,14},{-13,14}}, color={0,0,127})); connect(TDryBul.y, dewBulPhi.TDryBul) - annotation (Line(points={{-73,84},{-68,84},{-68,92},{15,92}}, + annotation (Line(points={{-72,84},{-68,84},{-68,92},{14,92}}, color={0,0,127})); connect(phi.y, dewBulPhi.phi) - annotation (Line(points={{-73,50},{-62,50},{-62,84},{15,84}}, + annotation (Line(points={{-72,50},{-62,50},{-62,84},{14,84}}, color={0,0,127})); connect(p.y, dewBulPhi.p) - annotation (Line(points={{-73,18},{-56,18},{-56,76},{15,76}}, + annotation (Line(points={{-72,18},{-56,18},{-56,76},{14,76}}, color={0,0,127})); connect(p.y, X_pTphi.p_in) - annotation (Line(points={{-73,18},{-56,18},{-56,20},{-48,20}}, + annotation (Line(points={{-72,18},{-56,18},{-56,20},{-48,20}}, color={0,0,127})); connect(TDryBul.y, X_pTphi.T) - annotation (Line(points={{-73,84},{-68,84},{-68,14},{-48,14}}, + annotation (Line(points={{-72,84},{-68,84},{-68,14},{-48,14}}, color={0,0,127})); connect(phi.y, X_pTphi.phi) - annotation (Line(points={{-73,50},{-62,50},{-62,8},{-48,8}}, + annotation (Line(points={{-72,50},{-62,50},{-62,8},{-48,8}}, color={0,0,127})); connect(TDewPoi.T, add.u2) annotation (Line(points={{39,14},{44,14},{44,44},{50,44}}, color={0,0,127})); connect(dewBulPhi.TDewPoi, add.u1) - annotation (Line(points={{37,84},{42,84},{42,56},{50,56}}, + annotation (Line(points={{38,84},{42,84},{42,56},{50,56}}, color={0,0,127})); connect(TDryBul2.y, dewBulPhi1.TDryBul) - annotation (Line(points={{-73,-18},{-68,-18},{-68,-10},{17,-10}}, + annotation (Line(points={{-72,-18},{-68,-18},{-68,-10},{16,-10}}, color={0,0,127})); connect(TDryBul2.y, X_pTphi1.T) - annotation (Line(points={{-73,-18},{-68,-18},{-68,-88},{-46,-88}}, + annotation (Line(points={{-72,-18},{-68,-18},{-68,-88},{-46,-88}}, color={0,0,127})); connect(p2.y, X_pTphi1.p_in) - annotation (Line(points={{-73,-84},{-56,-84},{-56,-82},{-46,-82}}, + annotation (Line(points={{-72,-84},{-56,-84},{-56,-82},{-46,-82}}, color={0,0,127})); connect(p2.y, dewBulPhi1.p) - annotation (Line(points={{-73,-84},{-56,-84},{-56,-26},{17,-26}}, + annotation (Line(points={{-72,-84},{-56,-84},{-56,-26},{16,-26}}, color={0,0,127})); connect(phi2.y, dewBulPhi1.phi) - annotation (Line(points={{-73,-50},{-62,-50},{-62,-18},{17,-18}}, + annotation (Line(points={{-72,-50},{-62,-50},{-62,-18},{16,-18}}, color={0,0,127})); connect(phi2.y, X_pTphi1.phi) - annotation (Line(points={{-73,-50},{-62,-50},{-62,-94},{-46,-94}}, + annotation (Line(points={{-72,-50},{-62,-50},{-62,-94},{-46,-94}}, color={0,0,127})); connect(X_pTphi1.X[1], humRat1.X_w) annotation (Line(points={{-23,-88},{-11,-88},{-11,-88}}, @@ -105,7 +110,7 @@ equation annotation (Line(points={{11,-88},{19,-88},{19,-88}}, color={0,0,127})); connect(dewBulPhi1.TDewPoi, add1.u1) - annotation (Line(points={{39,-18},{44,-18},{44,-44},{50,-44}}, + annotation (Line(points={{40,-18},{44,-18},{44,-44},{50,-44}}, color={0,0,127})); connect(TDewPoi1.T, add1.u2) annotation (Line(points={{41,-88},{46,-88},{46,-56},{50,-56}}, diff --git a/Buildings/Controls/OBC/CDL/Psychrometrics/Validation/TWetBul_TDryBulPhi.mo b/Buildings/Controls/OBC/CDL/Psychrometrics/Validation/TWetBul_TDryBulPhi.mo index b1d5947b971..cffb61ff3ee 100644 --- a/Buildings/Controls/OBC/CDL/Psychrometrics/Validation/TWetBul_TDryBulPhi.mo +++ b/Buildings/Controls/OBC/CDL/Psychrometrics/Validation/TWetBul_TDryBulPhi.mo @@ -32,48 +32,52 @@ model TWetBul_TDryBulPhi // =================================================================== Buildings.Controls.OBC.CDL.Continuous.Add add(k2=-1) + "Wet bulb temperature difference" annotation (Placement(transformation(extent={{40,6},{60,26}}))); Buildings.Controls.OBC.CDL.Continuous.Add add1(k2=-1) + "Wet bulb temperature difference" annotation (Placement(transformation(extent={{40,-34},{60,-14}}))); equation connect(x_pTphi.X[1], wetBulXi.Xi[1]) annotation (Line(points={{-19.4,-24},{-11,-24}}, color={0,0,127})); connect(TDryBul.y, wetBulPhi.TDryBul) - annotation (Line(points={{-69,56},{-40,56},{-40,64},{-11,64}}, + annotation (Line(points={{-68,56},{-40,56},{-40,64},{-12,64}}, color={0,0,127})); connect(TDryBul.y, wetBulPhi_BuiLib.TDryBul) - annotation (Line(points={{-69,56},{-40,56},{-40,24},{-11,24}}, + annotation (Line(points={{-68,56},{-40,56},{-40,24},{-11,24}}, color={0,0,127})); connect(TDryBul.y, wetBulXi.TDryBul) - annotation (Line(points={{-69,56},{-40,56},{-40,-10},{-16,-10},{-16,-16},{-11,-16}}, + annotation (Line(points={{-68,56},{-40,56},{-40,-10},{-16,-10},{-16,-16},{ + -11,-16}}, color={0,0,127})); connect(p.y, x_pTphi.p_in) - annotation (Line(points={{-69,-24},{-52,-24},{-52,-20.4},{-33.2,-20.4}}, + annotation (Line(points={{-68,-24},{-52,-24},{-52,-20.4},{-33.2,-20.4}}, color={0,0,127})); connect(phi.y, x_pTphi.phi) - annotation (Line(points={{-69,16},{-46,16},{-46,-27.6},{-33.2,-27.6}}, + annotation (Line(points={{-68,16},{-46,16},{-46,-27.6},{-33.2,-27.6}}, color={0,0,127})); connect(p.y, wetBulXi.p) - annotation (Line(points={{-69,-24},{-52,-24},{-52,-32},{-11,-32}}, + annotation (Line(points={{-68,-24},{-52,-24},{-52,-32},{-11,-32}}, color={0,0,127})); connect(phi.y, wetBulPhi_BuiLib.phi) - annotation (Line(points={{-69,16},{-11,16}}, + annotation (Line(points={{-68,16},{-11,16}}, color={0,0,127})); connect(phi.y, wetBulPhi.phi) - annotation (Line(points={{-69,16},{-46,16},{-46,52},{-28,52},{-28,56},{-11,56}}, + annotation (Line(points={{-68,16},{-46,16},{-46,52},{-28,52},{-28,56},{-12, + 56}}, color={0,0,127})); connect(p.y, wetBulPhi.p) - annotation (Line(points={{-69,-24},{-52,-24},{-52,48},{-11,48}}, + annotation (Line(points={{-68,-24},{-52,-24},{-52,48},{-12,48}}, color={0,0,127})); connect(p.y, wetBulPhi_BuiLib.p) - annotation (Line(points={{-69,-24},{-52,-24},{-52,8},{-11,8}}, + annotation (Line(points={{-68,-24},{-52,-24},{-52,8},{-11,8}}, color={0,0,127})); connect(TDryBul.y, x_pTphi.T) - annotation (Line(points={{-69,56},{-40,56},{-40,-24},{-33.2,-24}}, + annotation (Line(points={{-68,56},{-40,56},{-40,-24},{-33.2,-24}}, color={0,0,127})); connect(wetBulPhi.TWetBul, add.u1) - annotation (Line(points={{11,56},{22,56},{22,22},{38,22}}, + annotation (Line(points={{12,56},{22,56},{22,22},{38,22}}, color={0,0,127})); connect(wetBulPhi_BuiLib.TWetBul, add.u2) annotation (Line(points={{11,16},{28,16},{28,10},{38,10}}, diff --git a/Buildings/Controls/OBC/CDL/Utilities/SunRiseSet.mo b/Buildings/Controls/OBC/CDL/Utilities/SunRiseSet.mo index 086c5cb4044..b8c4db2ce7f 100644 --- a/Buildings/Controls/OBC/CDL/Utilities/SunRiseSet.mo +++ b/Buildings/Controls/OBC/CDL/Utilities/SunRiseSet.mo @@ -137,8 +137,9 @@ equation nextSunSet = sunSet(time,staTim,lat); end when; - sunUp = nextSunSet < nextSunRise - annotation (defaultComponentName="sunRiseSet", + sunUp = nextSunSet < nextSunRise; + +annotation (defaultComponentName="sunRiseSet", Documentation(info="

This block outputs the next sunrise and sunset time. diff --git a/Buildings/Controls/OBC/CDL/Utilities/Validation/SunRiseSetNegativeStartTime.mo b/Buildings/Controls/OBC/CDL/Utilities/Validation/SunRiseSetNegativeStartTime.mo index 8b7b3ecab48..be30c58d510 100644 --- a/Buildings/Controls/OBC/CDL/Utilities/Validation/SunRiseSetNegativeStartTime.mo +++ b/Buildings/Controls/OBC/CDL/Utilities/Validation/SunRiseSetNegativeStartTime.mo @@ -22,7 +22,6 @@ model SunRiseSetNegativeStartTime "Test model for the block SunRiseSet with nega lon=2.6354471705114, timZon=36000) "Sydney as a test example in the southern hemisphere" annotation (Placement(transformation(extent={{-10,-70},{10,-50}}))); -equation annotation ( experiment(StartTime=-43200, StopTime=259200, Tolerance=1e-06), diff --git a/Buildings/Controls/OBC/CDL/Utilities/Validation/SunRiseSetPositiveStartTime.mo b/Buildings/Controls/OBC/CDL/Utilities/Validation/SunRiseSetPositiveStartTime.mo index 2c49a26e188..2f85df9b3bf 100644 --- a/Buildings/Controls/OBC/CDL/Utilities/Validation/SunRiseSetPositiveStartTime.mo +++ b/Buildings/Controls/OBC/CDL/Utilities/Validation/SunRiseSetPositiveStartTime.mo @@ -22,7 +22,6 @@ model SunRiseSetPositiveStartTime "Test model for the block SunRiseSet with posi lon=2.6354471705114, timZon=36000) "Sydney as a test example in the southern hemisphere" annotation (Placement(transformation(extent={{-10,-70},{10,-50}}))); -equation annotation ( experiment(StartTime=43200, StopTime=345600, Tolerance=1e-06),