Skip to content

Commit

Permalink
Changed sensor configuration to avoid warning
Browse files Browse the repository at this point in the history
For #1857
  • Loading branch information
mwetter committed Mar 26, 2024
1 parent d1b4f9a commit 93434b3
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 21 deletions.
20 changes: 16 additions & 4 deletions IBPSA/Airflow/Multizone/Examples/CO2TransportStep.mo
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -65,6 +71,12 @@ the other rooms, and eventually its concentration decays.
</html>", revisions="<html>
<ul>
<li>
March 26, 2024, by Michael Wetter:<br/>
Configured the sensor parameter to suppress the warning about being a one-port connection.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1857\">IBPSA, #1857</a>.
</li>
<li>
March 26, 2021 by Michael Wetter:<br/>
Updated comments for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/515\">IBPSA, #515</a>.
Expand All @@ -78,4 +90,4 @@ and added documentation.
</li>
</ul>
</html>"));
end CO2TransportStep;
end CO2TransportStep;
14 changes: 11 additions & 3 deletions IBPSA/Fluid/Sensors/Conversions/Examples/To_VolumeFraction.mo
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -153,6 +155,12 @@ the setpoint, which does not comply with ASHRAE regulations.
</html>", revisions="<html>
<ul>
<li>
March 26, 2024, by Michael Wetter:<br/>
Configured the sensor parameter to suppress the warning about being a one-port connection.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1857\">IBPSA, #1857</a>.
</li>
<li>
May 2, 2019, by Jianjun Hu:<br/>
Replaced fluid source. This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1072\"> #1072</a>.
Expand All @@ -175,4 +183,4 @@ First implementation.
</li>
</ul>
</html>"));
end To_VolumeFraction;
end To_VolumeFraction;
32 changes: 24 additions & 8 deletions IBPSA/Fluid/Sources/Examples/TraceSubstancesFlowSource.mo
Original file line number Diff line number Diff line change
Expand Up @@ -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}})));
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -255,6 +265,12 @@ as there is a mass flow rate with zero CO<sub>2</sub> from the source <code>bou<
</html>", revisions="<html>
<ul>
<li>
March 26, 2024, by Michael Wetter:<br/>
Configured the sensor parameter to suppress the warning about being a one-port connection.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1857\">IBPSA, #1857</a>.
</li>
<li>
November 27, 2013 by Michael Wetter:<br/>
Added pressure boundary condition to model.
This is required for the new air model,
Expand All @@ -278,4 +294,4 @@ First implementation.
</li>
</ul>
</html>"));
end TraceSubstancesFlowSource;
end TraceSubstancesFlowSource;
14 changes: 11 additions & 3 deletions IBPSA/ThermalZones/ReducedOrder/Validation/RoomWithLatentGain.mo
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -39,6 +41,12 @@ This test case changes the medium to moist air, and adds latent heat gain.
</html>", revisions="<html>
<ul>
<li>
March 26, 2024, by Michael Wetter:<br/>
Configured the sensor parameter to suppress the warning about being a one-port connection.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1857\">IBPSA, #1857</a>.
</li>
<li>
October 9, 2019, by Michael Wetter:<br/>
First implementation.<br/>
This is for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1209\">IBPSA, issue 1209</a>.
Expand All @@ -53,4 +61,4 @@ experiment(
"Simulate and plot"),
Diagram(coordinateSystem(extent={{-140,-100},{140,100}})),
Icon(coordinateSystem(extent={{-100,-100},{100,100}})));
end RoomWithLatentGain;
end RoomWithLatentGain;
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ model RoomWithoutLatentGain
rotation=0,
origin={23,3})));
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
Expand All @@ -46,6 +48,12 @@ This test case changes the medium to moist air, and adds zero latent heat gain.
</html>", revisions="<html>
<ul>
<li>
March 26, 2024, by Michael Wetter:<br/>
Configured the sensor parameter to suppress the warning about being a one-port connection.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1857\">IBPSA, #1857</a>.
</li>
<li>
October 9, 2019, by Michael Wetter:<br/>
First implementation.<br/>
This is for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1209\">IBPSA, issue 1209</a>.
Expand All @@ -60,4 +68,4 @@ experiment(
"Simulate and plot"),
Diagram(coordinateSystem(extent={{-140,-100},{140,100}})),
Icon(coordinateSystem(extent={{-100,-100},{100,100}})));
end RoomWithoutLatentGain;
end RoomWithoutLatentGain;

0 comments on commit 93434b3

Please sign in to comment.