From ca5d2490de97dac5541dd5aa18ab1d26ca73b52e Mon Sep 17 00:00:00 2001
From: Michael Wetter
Date: Fri, 8 Mar 2024 14:49:05 -0800
Subject: [PATCH 1/4] Remove trailing white spaces (#3685)
This removes trailing white spaces in the Experimental package
---
.../DHC/Networks/Controls/AgentPump1Pipe.mo | 6 +++---
.../DHC/Networks/Examples/Distribution1PipeExample.mo | 8 ++++----
.../DHC/Networks/Examples/Distribution2PipeExample.mo | 10 +++++-----
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/Buildings/Experimental/DHC/Networks/Controls/AgentPump1Pipe.mo b/Buildings/Experimental/DHC/Networks/Controls/AgentPump1Pipe.mo
index b4a49bb982a..56b23f6b73f 100644
--- a/Buildings/Experimental/DHC/Networks/Controls/AgentPump1Pipe.mo
+++ b/Buildings/Experimental/DHC/Networks/Controls/AgentPump1Pipe.mo
@@ -218,11 +218,11 @@ Controller for balacing agents (i.e. reservoirs and plants) pump.
This controller decides to turn on or off the agent pump depending on the current net demand of the
-district if TRetDis > TSupDis cooling else heating
and the temperature differential
+district if TRetDis > TSupDis cooling else heating
and the temperature differential
between the agent source temperature TSou
and the agent inlet temperature TSouIn
adjusted by the offset dToff
. In particular the pump turns on : if heating and TSou - TSouIn - dToff > 0
-or if cooling and TSouIn - Tsou - dToff > 0
. Then if the pump is turned on a PID controller,
-by default used as P, controls the pump control input by using TSouOut
as measurement and as setpoint
+or if cooling and TSouIn - Tsou - dToff > 0
. Then if the pump is turned on a PID controller,
+by default used as P, controls the pump control input by using TSouOut
as measurement and as setpoint
TSou - dToff
for heating or TSou + dToff
for cooling. dToff
can be considered
the nominal value of the agent heat exchanger pinch point temperature difference.
diff --git a/Buildings/Experimental/DHC/Networks/Examples/Distribution1PipeExample.mo b/Buildings/Experimental/DHC/Networks/Examples/Distribution1PipeExample.mo
index 6b837b0bebd..a8e6a10b4ae 100644
--- a/Buildings/Experimental/DHC/Networks/Examples/Distribution1PipeExample.mo
+++ b/Buildings/Experimental/DHC/Networks/Examples/Distribution1PipeExample.mo
@@ -263,13 +263,13 @@ equation
Documentation(
info="
Date: Sat, 9 Mar 2024 17:58:36 -0800
Subject: [PATCH 2/4] deleted triggeredTrapezoid (#3690)
* deleted triggeredTrapezoid
* moved triggeredTrapezoid images to obsolete
---
.../OBC/CDL/Logical/TriggeredTrapezoid.mo | 163 ------------------
.../Controls/OBC/CDL/Logical/package.order | 1 -
.../OBC/CDL/Logical/TriggeredTrapezoid.mo | 2 +-
.../OBC/CDL/Logical/TriggeredTrapezoid.png | Bin
.../OBC/CDL/Logical/TriggeredTrapezoid.svg | 0
5 files changed, 1 insertion(+), 165 deletions(-)
delete mode 100644 Buildings/Controls/OBC/CDL/Logical/TriggeredTrapezoid.mo
rename Buildings/Resources/Images/{ => Obsolete}/Controls/OBC/CDL/Logical/TriggeredTrapezoid.png (100%)
rename Buildings/Resources/Images/{ => Obsolete}/Controls/OBC/CDL/Logical/TriggeredTrapezoid.svg (100%)
diff --git a/Buildings/Controls/OBC/CDL/Logical/TriggeredTrapezoid.mo b/Buildings/Controls/OBC/CDL/Logical/TriggeredTrapezoid.mo
deleted file mode 100644
index 548d68e86f2..00000000000
--- a/Buildings/Controls/OBC/CDL/Logical/TriggeredTrapezoid.mo
+++ /dev/null
@@ -1,163 +0,0 @@
-within Buildings.Controls.OBC.CDL.Logical;
-block TriggeredTrapezoid
- "Triggered trapezoid generator"
- parameter Real amplitude
- "Amplitude of trapezoid";
- parameter Real rising(
- final quantity="Time",
- final unit="s",
- final min=0)=0
- "Rising duration of trapezoid";
- parameter Real falling(
- final quantity="Time",
- final unit="s",
- final min=0)=rising
- "Falling duration of trapezoid";
- parameter Real offset=0
- "Offset of output signal";
- Interfaces.BooleanInput u
- "Connector of Boolean input signal"
- annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
- Interfaces.RealOutput y
- "Connector of Real output signal"
- annotation (Placement(transformation(extent={{100,-20},{140,20}})));
-
-protected
- discrete Real endValue
- "Value of y at time of recent edge";
- discrete Real rate
- "Current rising/falling rate";
- discrete Real T(
- final quantity="Time",
- final unit="s")
- "Predicted time of output reaching endValue";
-
-equation
- y=if time < T then
- endValue-(T-time)*rate
- else
- endValue;
- when {initial(),u,not u} then
- endValue=
- if u then
- offset+amplitude
- else
- offset;
- rate=
- if u and
- (rising > 0) then
- amplitude/rising
- else
- if not u and
- (falling > 0) then
- -amplitude/falling
- else
- 0;
- T=if u and not
- (rising > 0) or not u and not
- (falling > 0) or not abs(amplitude) > 0 or initial() then
- time
- else
- time+(endValue-pre(y))/rate;
- end when;
- annotation (
- defaultComponentName="triTra",
- Icon(
- coordinateSystem(
- preserveAspectRatio=true,
- extent={{-100.0,-100.0},{100.0,100.0}}),
- graphics={
- Rectangle(
- extent={{-100,100},{100,-100}},
- fillColor={210,210,210},
- lineThickness=5.0,
- fillPattern=FillPattern.Solid,
- borderPattern=BorderPattern.Raised),
- Line(
- points={{-46,-70},{-46,-70},{-16,40},{22,40},{54,-70},{54,-70}},
- color={0,0,127}),
- Line(
- points={{-90.0,-70.0},{82.0,-70.0}},
- color={192,192,192}),
- Line(
- points={{-66,68},{-66,-80}},
- color={192,192,192}),
- Polygon(
- lineColor={192,192,192},
- fillColor={192,192,192},
- fillPattern=FillPattern.Solid,
- points={{-66,90},{-74,68},{-58,68},{-66,90}}),
- Line(
- points={{-66,-70},{-46,-70},{-46,24},{22,24},{22,-70},{74,-70}},
- color={255,0,255}),
- Ellipse(
- extent={{-71,7},{-85,-7}},
- lineColor=DynamicSelect({235,235,235},
- if u then
- {0,255,0}
- else
- {235,235,235}),
- fillColor=DynamicSelect({235,235,235},
- if u then
- {0,255,0}
- else
- {235,235,235}),
- fillPattern=FillPattern.Solid),
- Polygon(
- lineColor={192,192,192},
- fillColor={192,192,192},
- fillPattern=FillPattern.Solid,
- points={{90.0,-70.0},{68.0,-62.0},{68.0,-78.0},{90.0,-70.0}}),
- Text(
- extent={{-150,150},{150,110}},
- textColor={0,0,255},
- textString="%name")}),
- Diagram(
- coordinateSystem(
- preserveAspectRatio=true,
- extent={{-100,-100},{100,100}})),
- Documentation(
- info="
-
-Block that represents a triggered trapezoid.
-
-
-The block has a Boolean input and a Real
-output signal and requires the parameters amplitude,
-rising, falling and offset. The
-output signal y
represents a trapezoidal signal dependent on the
-input signal u
.
-
-The behaviour is as follows: Assume the initial input to be
-false
. In this
-case, the output will be offset. After a rising edge (i.e., the input
-changes from false
to true
),
-the output is rising during rising to the
-sum of offset and amplitude. In contrast, after a falling
-edge (i.e., the input changes from true to false), the output is falling
-during falling to a value of offset.
-
-
-
-
-
-Note, the case of edges before expiration of rising or falling is
-handled properly.
-",
- revisions="
-
--
-November 12, 2020, by Michael Wetter:
-Reformulated to remove dependency to Modelica.Units.SI
.
-This is for
-issue 2243.
-
--
-January 3, 2017, by Michael Wetter:
-First implementation, based on the implementation of the
-Modelica Standard Library.
-
-
-"));
-end TriggeredTrapezoid;
diff --git a/Buildings/Controls/OBC/CDL/Logical/package.order b/Buildings/Controls/OBC/CDL/Logical/package.order
index ba45b4c1c9f..c8ee34aeeb2 100644
--- a/Buildings/Controls/OBC/CDL/Logical/package.order
+++ b/Buildings/Controls/OBC/CDL/Logical/package.order
@@ -15,7 +15,6 @@ Switch
Timer
TimerAccumulating
Toggle
-TriggeredTrapezoid
TrueDelay
TrueFalseHold
TrueHoldWithReset
diff --git a/Buildings/Obsolete/Controls/OBC/CDL/Logical/TriggeredTrapezoid.mo b/Buildings/Obsolete/Controls/OBC/CDL/Logical/TriggeredTrapezoid.mo
index 3cc489d94d4..44f24ffd094 100644
--- a/Buildings/Obsolete/Controls/OBC/CDL/Logical/TriggeredTrapezoid.mo
+++ b/Buildings/Obsolete/Controls/OBC/CDL/Logical/TriggeredTrapezoid.mo
@@ -140,7 +140,7 @@ edge (i.e., the input changes from true to false), the output is falling
during falling to a value of offset.
-
diff --git a/Buildings/Resources/Images/Controls/OBC/CDL/Logical/TriggeredTrapezoid.png b/Buildings/Resources/Images/Obsolete/Controls/OBC/CDL/Logical/TriggeredTrapezoid.png
similarity index 100%
rename from Buildings/Resources/Images/Controls/OBC/CDL/Logical/TriggeredTrapezoid.png
rename to Buildings/Resources/Images/Obsolete/Controls/OBC/CDL/Logical/TriggeredTrapezoid.png
diff --git a/Buildings/Resources/Images/Controls/OBC/CDL/Logical/TriggeredTrapezoid.svg b/Buildings/Resources/Images/Obsolete/Controls/OBC/CDL/Logical/TriggeredTrapezoid.svg
similarity index 100%
rename from Buildings/Resources/Images/Controls/OBC/CDL/Logical/TriggeredTrapezoid.svg
rename to Buildings/Resources/Images/Obsolete/Controls/OBC/CDL/Logical/TriggeredTrapezoid.svg
From 644166697cc7ef4393b3a85ad003a53a18e4170c Mon Sep 17 00:00:00 2001
From: Michael Wetter
Date: Sun, 10 Mar 2024 09:04:36 -0700
Subject: [PATCH 3/4] Updated conf.yml for Optimica 1.48.2 with latest
Experimental.DHC (#3686)
* Updated optimica to 1.48.2
* Updated conf.yml for Optimica 1.48.2 with latest Experimental.DHC
---
.travis.yml | 2 +-
.../Resources/Scripts/BuildingsPy/conf.yml | 49 +++++++------------
2 files changed, 20 insertions(+), 31 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index ffea89089f4..9f15deffc28 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -33,7 +33,7 @@ env:
- DOCKER_REPONAME=lbnlblum
- BUILDINGSPY_VERSION=BuildingsPy@v5.0.0
- OMC_VERSION=ubuntu-2204-omc:1.22.1-1
- - OPTIMICA_VERSION=travis-ubuntu-2204-optimica:1.43.4_rev-1
+ - OPTIMICA_VERSION=travis-ubuntu-2204-optimica:1.48.2
- DYMOLA_VERSION=travis_ubuntu-2004_dymola:2024x-x86_64
- ENERGYPLUS_9_6_0=EnergyPlus-9.6.0-f420c06a69-Linux-Ubuntu20.04-x86_64
- ENERGYPLUS_23_1_0=EnergyPlus-23.1.0-87ed9199d4-Linux-Ubuntu20.04-x86_64
diff --git a/Buildings/Resources/Scripts/BuildingsPy/conf.yml b/Buildings/Resources/Scripts/BuildingsPy/conf.yml
index 17f96ed06a2..f69b70c0919 100644
--- a/Buildings/Resources/Scripts/BuildingsPy/conf.yml
+++ b/Buildings/Resources/Scripts/BuildingsPy/conf.yml
@@ -88,11 +88,17 @@
openmodelica:
comment: Timeout during translation
time_out: 600
+ optimica:
+ comment: Timeout on travis
+ time_out: 600
- model_name: Buildings.Examples.VAVReheat.Validation.Guideline36SteadyState
openmodelica:
comment: simulation terminated by an assertion at initialization
simulate: false
time_out: 600
+ optimica:
+ comment: timeout on travis after 300s, https://app.travis-ci.com/github/lbl-srg/modelica-buildings/jobs/618700275
+ time_out: 600
- model_name: Buildings.Experimental.DHC.EnergyTransferStations.Combined.Validation.ChillerBorefield
openmodelica:
comment: Timeout on travis after 900 seconds, https://app.travis-ci.com/github/lbl-srg/modelica-buildings/jobs/615261271
@@ -105,16 +111,10 @@
openmodelica:
comment: simulation terminated by an assertion at initialization
simulate: false
- optimica:
- comment: FMUException Failed to update the events at time 0.000000E+00.
- simulate: false
- model_name: Buildings.Experimental.DHC.Examples.Combined.SeriesVariableFlow
openmodelica:
comment: simulation terminated by an assertion at initialization
simulate: false
- optimica:
- comment: FMUException Failed to update the events at time 0.000000E+00.
- simulate: false
- model_name: Buildings.Experimental.DHC.Examples.Combined.SeriesVariableFlowAgentControl
openmodelica:
comment: simulation terminated by an assertion at initialization
@@ -131,16 +131,12 @@
translate: false
- model_name: Buildings.Experimental.DHC.Loads.BaseClasses.Examples.CouplingTimeSeries
openmodelica:
- comment: "simulation terminated by an assertion at initialization, Invalid root: (0)^(-1.5), corrected in OMC 1.23.0~dev-206-g00d3636"
+ comment: 'simulation terminated by an assertion at initialization, Invalid root: (0)^(-1.5), corrected in OMC 1.23.0~dev-206-g00d3636'
simulate: false
- model_name: Buildings.Experimental.DHC.Loads.BaseClasses.Examples.CouplingTimeSeriesSingleLoop
openmodelica:
comment: simulation terminated by an assertion at initialization
simulate: false
-- model_name: Buildings.Experimental.DHC.Loads.BaseClasses.Validation.FlowDistributionPumpControl
- optimica:
- comment: The rootfinding function failed in an unrecoverable manner. At time 5959.741337. (Radau5ODE fails at 3540.029280) (but works locally)
- simulate: false
- model_name: Buildings.Experimental.DHC.Loads.Combined.Examples.BuildingTimeSeriesWithETS
openmodelica:
comment: simulation terminated by an assertion at initialization
@@ -149,9 +145,6 @@
openmodelica:
comment: simulation terminated by an assertion at initialization [works ok in Ubuntu 20 with OM 1.22.0]
simulate: false
- optimica:
- comment: FMUException Failed to update the events at time 4.306206E+04
- simulate: false
- model_name: Buildings.Experimental.DHC.Loads.Cooling.Examples.BuildingTimeSeriesWithETS
openmodelica:
comment: simulation terminated by an assertion at initialization
@@ -167,12 +160,13 @@
comment: Internal error NFCeval.evalBinaryMul failed to evaluate {0.0, 0.03359309597916374, 0.06718619195832748, 0.09151222697772191}[pressure.n] * 0.0
translate: false
optimica:
- comment: pyfmi.fmi.FMUException Failed to update the events at time 3.024307E+06
- simulate: false
+ time_out: 600
- model_name: Buildings.Experimental.DHC.Plants.Combined.Validation.AllElectricCWStorage
openmodelica:
comment: Internal error NFCeval.evalBinaryMul failed to evaluate {0.0, 0.03359309597916374, 0.06718619195832748, 0.09151222697772191}[pressure.n] * 0.0
translate: false
+ optimica:
+ time_out: 600
- model_name: Buildings.Experimental.DHC.Plants.Cooling.Examples.StoragePlantDualSource
openmodelica:
comment: 'Could not evaluate structural parameter (or constant): mChi_flow_nominal'
@@ -181,10 +175,6 @@
openmodelica:
comment: simulation terminated by an assertion at initialization
simulate: false
-- model_name: Buildings.Experimental.DHC.Plants.Steam.Examples.SingleBoiler
- optimica:
- comment: Fails initialization, works if Buildings.Experimental.DHC.Plants.Steam.SingleBoiler.allowFlowReversal=true, but then OpenModelica fails
- simulate: false
- model_name: Buildings.Fluid.Examples.FlowSystem.Basic
openmodelica:
comment: '''omc'' caused ''simulation terminated by an assertion at initialization''.'
@@ -219,6 +209,10 @@
openmodelica:
comment: returned non-zero exit status 255.
simulate: false
+- model_name: Buildings.Fluid.FixedResistances.BuriedPipes.Examples.TwoPipesConduit
+ openmodelica:
+ comment: Assertion due to what looks like wrong results, see https://github.com/lbl-srg/modelica-buildings/issues/3687
+ simulate: false
- model_name: Buildings.Fluid.FixedResistances.BuriedPipes.Validation.GroundCouplingAIT
openmodelica:
comment: Timed out after 300 seconds, https://app.travis-ci.com/github/lbl-srg/modelica-buildings/jobs/559381269#L479
@@ -230,12 +224,15 @@
time_out: 600
- model_name: Buildings.Fluid.FixedResistances.Validation.PlugFlowPipes.PlugFlowAIT
openmodelica:
- comment: timed out after 300 seconds
- time_out: 600
+ comment: timed out after 600 seconds
+ time_out: 900
- model_name: Buildings.Fluid.Geothermal.Aquifer.Validation.SimulationTest
openmodelica:
comment: Timeout after 300 s
time_out: 600
+ optimica:
+ comment: Timeout after 300 s
+ time_out: 600
- model_name: Buildings.Fluid.HydronicConfigurations.ActiveNetworks.Examples.DecouplingMixing
openmodelica:
comment: Timeout after 600 s on travis, https://app.travis-ci.com/github/lbl-srg/modelica-buildings/jobs/600714398#L489
@@ -461,10 +458,6 @@
simulate: false
optimica:
rtol: 1.0e-08
-- model_name: Buildings.ThermalZones.EnergyPlus_9_6_0.Examples.SmallOffice.Unconditioned
- optimica:
- comment: Timeout after 300s
- simulate: false
- model_name: Buildings.ThermalZones.EnergyPlus_9_6_0.Validation.MultipleBuildings.TwoIdenticalTwoZoneBuildings
openmodelica:
comment: returned non-zero exit status 139.
@@ -501,7 +494,3 @@
optimica:
comment: Optimica uses Python 3.9, while the examples use Python 3.8
translate: false
-- model_name: Buildings.Utilities.Plotters.Examples.SingleZoneVAV
- optimica:
- comment: 'CVodeError: The right-hand side function had repeated recoverable errors. Since OCT 1.40.'
- simulate: false
From ab1e68aaa35b8a975cff2daccbc15c4fb889a5ff Mon Sep 17 00:00:00 2001
From: Michael Wetter
Date: Mon, 11 Mar 2024 09:55:01 -0700
Subject: [PATCH 4/4] Changed set point that is used when heater is off (#3682)
For #3681
---
.../ChillerCooled/Equipment/ElectricHeater.mo | 16 ++++++++++---
...olingCoilHumidifyingHeating_ClosedLoop.txt | 18 +++++++-------
...CoolingCoilHumidifyingHeating_OpenLoop.txt | 18 +++++++-------
...es_IntegratedPrimaryLoadSideEconomizer.txt | 24 +++++++++----------
...s_IntegratedPrimarySecondaryEconomizer.txt | 24 +++++++++----------
...onIntegratedPrimarySecondaryEconomizer.txt | 22 ++++++++---------
6 files changed, 66 insertions(+), 56 deletions(-)
diff --git a/Buildings/Applications/DataCenters/ChillerCooled/Equipment/ElectricHeater.mo b/Buildings/Applications/DataCenters/ChillerCooled/Equipment/ElectricHeater.mo
index 4b75099a7cb..7c14a69b8e4 100644
--- a/Buildings/Applications/DataCenters/ChillerCooled/Equipment/ElectricHeater.mo
+++ b/Buildings/Applications/DataCenters/ChillerCooled/Equipment/ElectricHeater.mo
@@ -65,8 +65,11 @@ protected
Modelica.Blocks.Logical.Switch swi "Switch for temperature setpoint"
annotation (Placement(transformation(extent={{-60,20},{-40,40}})));
- Modelica.Blocks.Sources.Constant zer(final k=-273.15)
- "Zero signal"
+ Modelica.Blocks.Sources.Constant zer(
+ final k(
+ unit="K",
+ displayUnit="degC") = 273.15)
+ "Zero signal, set to 0 degC which essentially switches off any heating"
annotation (Placement(transformation(extent={{-100,-40},{-80,-20}})));
initial equation
@@ -147,11 +150,18 @@ Model for an ideal heater that controls its outlet temperature to
a prescribed outlet temperature with constant efficiency.
-The switch model swi
is used to turn on/off the heater.
+The switch model swi
is used to turn on/off the heater,
+which is accomplished by commanding it to heat the incoming fluid to 0°C.