From 93434b3b045a8b2e86dc8f8a57c8c5641c4a7382 Mon Sep 17 00:00:00 2001 From: Michael Wetter Date: Tue, 26 Mar 2024 14:48:58 -0700 Subject: [PATCH] Changed sensor configuration to avoid warning For #1857 --- .../Multizone/Examples/CO2TransportStep.mo | 20 +++++++++--- .../Conversions/Examples/To_VolumeFraction.mo | 14 ++++++-- .../Examples/TraceSubstancesFlowSource.mo | 32 ++++++++++++++----- .../Validation/RoomWithLatentGain.mo | 14 ++++++-- .../Validation/RoomWithoutLatentGain.mo | 14 ++++++-- 5 files changed, 73 insertions(+), 21 deletions(-) diff --git a/IBPSA/Airflow/Multizone/Examples/CO2TransportStep.mo b/IBPSA/Airflow/Multizone/Examples/CO2TransportStep.mo index 4ef6059747..7ddb308095 100644 --- a/IBPSA/Airflow/Multizone/Examples/CO2TransportStep.mo +++ b/IBPSA/Airflow/Multizone/Examples/CO2TransportStep.mo @@ -5,13 +5,19 @@ model CO2TransportStep "Model with transport of CO2 through buoyancy driven flow volTop(nPorts=3), volEas(nPorts=6)); - IBPSA.Fluid.Sensors.TraceSubstances CO2SenTop(redeclare package Medium = Medium) + IBPSA.Fluid.Sensors.TraceSubstances CO2SenTop( + redeclare package Medium = Medium, + warnAboutOnePortConnection = false) "CO2 sensor" annotation (Placement(transformation(extent={{20,120},{40,140}}))); - IBPSA.Fluid.Sensors.TraceSubstances CO2SenWes(redeclare package Medium = Medium) + IBPSA.Fluid.Sensors.TraceSubstances CO2SenWes( + redeclare package Medium = Medium, + warnAboutOnePortConnection = false) "CO2 sensor" annotation (Placement(transformation(extent={{-102,10},{-82,30}}))); - IBPSA.Fluid.Sensors.TraceSubstances CO2SenEas(redeclare package Medium = Medium) + IBPSA.Fluid.Sensors.TraceSubstances CO2SenEas( + redeclare package Medium = Medium, + warnAboutOnePortConnection = false) "CO2 sensor" annotation (Placement(transformation(extent={{58,10},{78,30}}))); Modelica.Blocks.Sources.Pulse pulse( @@ -65,6 +71,12 @@ the other rooms, and eventually its concentration decays. ", revisions=" ")); -end CO2TransportStep; +end CO2TransportStep; \ No newline at end of file diff --git a/IBPSA/Fluid/Sensors/Conversions/Examples/To_VolumeFraction.mo b/IBPSA/Fluid/Sensors/Conversions/Examples/To_VolumeFraction.mo index 38499a6d31..c4e5cc9a11 100644 --- a/IBPSA/Fluid/Sensors/Conversions/Examples/To_VolumeFraction.mo +++ b/IBPSA/Fluid/Sensors/Conversions/Examples/To_VolumeFraction.mo @@ -16,8 +16,10 @@ model To_VolumeFraction "Example problem for conversion model" k=2, Td=1) annotation (Placement(transformation(extent={{-100,-20},{-80,0}}))); - IBPSA.Fluid.Sensors.TraceSubstances senCO2(redeclare package Medium = - Medium, substanceName="CO2") "CO2 sensor" + IBPSA.Fluid.Sensors.TraceSubstances senCO2( + redeclare package Medium = Medium, + substanceName="CO2", + warnAboutOnePortConnection = false) "CO2 sensor" annotation (Placement(transformation(extent={{120,0},{140,20}}))); IBPSA.Fluid.MixingVolumes.MixingVolume vol( nPorts=4, @@ -153,6 +155,12 @@ the setpoint, which does not comply with ASHRAE regulations. ", revisions=" ")); -end To_VolumeFraction; +end To_VolumeFraction; \ No newline at end of file diff --git a/IBPSA/Fluid/Sources/Examples/TraceSubstancesFlowSource.mo b/IBPSA/Fluid/Sources/Examples/TraceSubstancesFlowSource.mo index 8da2590abd..a24fd0fa78 100644 --- a/IBPSA/Fluid/Sources/Examples/TraceSubstancesFlowSource.mo +++ b/IBPSA/Fluid/Sources/Examples/TraceSubstancesFlowSource.mo @@ -11,11 +11,13 @@ model TraceSubstancesFlowSource energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Mixing volume" annotation (Placement(transformation(extent={{100,120}, {120,140}}))); - Sources.TraceSubstancesFlowSource sou(redeclare package Medium = Medium, - use_m_flow_in=true, + Sources.TraceSubstancesFlowSource sou( + redeclare package Medium = Medium, + use_m_flow_in=true, nPorts=1) annotation (Placement(transformation(extent={{-46,110},{-26,130}}))); - Modelica.Blocks.Sources.Step step( startTime=0.5, + Modelica.Blocks.Sources.Step step( + startTime=0.5, height=-2, offset=2) annotation (Placement(transformation(extent={{-92,30},{-72,50}}))); @@ -106,16 +108,24 @@ model TraceSubstancesFlowSource "Resistance, used to check if species are transported between ports" annotation (Placement(transformation(extent={{-28,-80},{-6,-60}}))); - Sensors.TraceSubstances C(redeclare package Medium = Medium) + Sensors.TraceSubstances C( + redeclare package Medium = Medium, + warnAboutOnePortConnection = false) "Trace substance sensor" annotation (Placement(transformation(extent={{120,134},{140,154}}))); - Sensors.TraceSubstances C1(redeclare package Medium = Medium) + Sensors.TraceSubstances C1( + redeclare package Medium = Medium, + warnAboutOnePortConnection = false) "Trace substance sensor" annotation (Placement(transformation(extent={{120,90},{140,110}}))); - Sensors.TraceSubstances C2(redeclare package Medium = Medium) + Sensors.TraceSubstances C2( + redeclare package Medium = Medium, + warnAboutOnePortConnection = false) "Trace substance sensor" annotation (Placement(transformation(extent={{168,6},{188,26}}))); - Sensors.TraceSubstances C3(redeclare package Medium = Medium) + Sensors.TraceSubstances C3( + redeclare package Medium = Medium, + warnAboutOnePortConnection = false) "Trace substance sensor" annotation (Placement(transformation(extent={{188,-50},{208,-30}}))); FixedResistances.PressureDrop res4( @@ -255,6 +265,12 @@ as there is a mass flow rate with zero CO2 from the source bou< ", revisions=" ")); -end TraceSubstancesFlowSource; +end TraceSubstancesFlowSource; \ No newline at end of file diff --git a/IBPSA/ThermalZones/ReducedOrder/Validation/RoomWithLatentGain.mo b/IBPSA/ThermalZones/ReducedOrder/Validation/RoomWithLatentGain.mo index ee7dad99c6..8bc010e209 100644 --- a/IBPSA/ThermalZones/ReducedOrder/Validation/RoomWithLatentGain.mo +++ b/IBPSA/ThermalZones/ReducedOrder/Validation/RoomWithLatentGain.mo @@ -14,11 +14,13 @@ model RoomWithLatentGain startTime3=0, endTime3=0)); Fluid.Sensors.RelativeHumidity senRelHum( - redeclare package Medium = Medium) + redeclare package Medium = Medium, + warnAboutOnePortConnection = false) "Relative humidity of room air" annotation (Placement(transformation(extent={{110,-20},{130,0}}))); Fluid.Sensors.MassFraction senMasFra( - redeclare package Medium = Medium) + redeclare package Medium = Medium, + warnAboutOnePortConnection = false) "Absolute humidity of room air in kg/kg total air" annotation (Placement(transformation(extent={{110,-50},{130,-30}}))); equation @@ -39,6 +41,12 @@ This test case changes the medium to moist air, and adds latent heat gain. ", revisions="