Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 181 IBPSA May 2024 #182

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
616 changes: 611 additions & 5 deletions BuildingSystems/.copiedFiles.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Interpolate
PowerLaw
PowerLawFixedM
WindPressureLowRise
Expand Down
81 changes: 0 additions & 81 deletions BuildingSystems/Airflow/Multizone/BaseClasses/interpolate.mo

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ PowerLawResistanceParameters
TwoWayFlowElement
TwoWayFlowElementBuoyancy
ZonalFlow
interpolate
powerLaw
powerLawFixedM
windPressureLowRise
Expand Down
20 changes: 16 additions & 4 deletions BuildingSystems/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));

BuildingSystems.Fluid.Sensors.TraceSubstances CO2SenTop(redeclare package Medium = Medium)
BuildingSystems.Fluid.Sensors.TraceSubstances CO2SenTop(
redeclare package Medium = Medium,
warnAboutOnePortConnection = false)
"CO2 sensor"
annotation (Placement(transformation(extent={{20,120},{40,140}})));
BuildingSystems.Fluid.Sensors.TraceSubstances CO2SenWes(redeclare package Medium = Medium)
BuildingSystems.Fluid.Sensors.TraceSubstances CO2SenWes(
redeclare package Medium = Medium,
warnAboutOnePortConnection = false)
"CO2 sensor"
annotation (Placement(transformation(extent={{-102,10},{-82,30}})));
BuildingSystems.Fluid.Sensors.TraceSubstances CO2SenEas(redeclare package Medium = Medium)
BuildingSystems.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;
10 changes: 6 additions & 4 deletions BuildingSystems/Airflow/Multizone/MediumColumn.mo
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,13 @@ equation
Text(
extent={{24,-78},{106,-100}},
textColor={0,0,127},
textString="Bottom"),
textString="Bottom",
fontSize=36),
Text(
extent={{32,104},{98,70}},
textColor={0,0,127},
textString="Top"),
textString="Top",
fontSize=36),
Text(
extent={{36,26},{88,-10}},
textColor={0,0,127},
Expand All @@ -129,7 +131,7 @@ equation
Text(
extent={{-50.5,20.5},{50.5,-20.5}},
textColor={0,0,127},
origin={-72.5,-12.5},
origin={-72.5,-0.5},
rotation=90,
textString="%name"),
Rectangle(
Expand All @@ -141,7 +143,7 @@ equation
lineColor={0,0,0}),
Rectangle(
visible=densitySelection == BuildingSystems.Airflow.Multizone.Types.densitySelection.fromBottom,
extent={{-16,0},{16,-82}},
extent={{-16,0},{16,-80}},
fillColor={85,170,255},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None,
Expand Down
46 changes: 16 additions & 30 deletions BuildingSystems/Airflow/Multizone/MediumColumnDynamic.mo
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ model MediumColumnDynamic

equation
connect(colBot.port_a, vol.ports[1]) annotation (Line(
points={{0,-40},{0,-40},{0,-2},{-10,-2}},
points={{0,-40},{0,-40},{0,-1},{-10,-1}},
color={0,127,255}));
connect(vol.ports[2], colTop.port_b) annotation (Line(
points={{-10,2},{0,2},{0,40},{0,40}},
points={{-10,1},{0,1},{0,40},{0,40}},
color={0,127,255}));
connect(colTop.port_a, port_a) annotation (Line(
points={{0,60},{0,80},{0,80},{0,100}},
Expand All @@ -98,56 +98,36 @@ equation
Text(
extent={{24,-78},{106,-100}},
textColor={0,0,127},
textString="Bottom"),
textString="Bottom",
fontSize=36),
Text(
extent={{32,104},{98,70}},
textColor={0,0,127},
textString="Top"),
textString="Top",
fontSize=36),
Text(
extent={{42,26},{94,-10}},
textColor={0,0,127},
fillColor={255,0,0},
fillPattern=FillPattern.Solid,
textString="h=%h"),
Rectangle(
visible=densitySelection == BuildingSystems.Airflow.Multizone.Types.densitySelection.fromTop,
extent={{-16,78},{16,-2}},
fillColor={85,170,255},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None,
lineColor={0,0,0}),
Text(
extent={{-50.5,20.5},{50.5,-20.5}},
textColor={0,0,127},
origin={-72.5,-12.5},
origin={-72.5,-0.5},
rotation=90,
textString="%name"),
Rectangle(
visible=densitySelection == BuildingSystems.Airflow.Multizone.Types.densitySelection.actual,
extent={{-16,80},{16,54}},
fillColor={85,170,255},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None,
lineColor={0,0,0}),
Rectangle(
visible=densitySelection == BuildingSystems.Airflow.Multizone.Types.densitySelection.fromBottom,
extent={{-16,0},{16,-82}},
fillColor={85,170,255},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None,
lineColor={0,0,0}),
Rectangle(
visible=densitySelection == BuildingSystems.Airflow.Multizone.Types.densitySelection.actual,
extent={{-16,-55},{16,-80}},
extent={{-16,80},{16,-80}},
fillColor={85,170,255},
fillPattern=FillPattern.Solid,
pattern=LinePattern.None,
lineColor={0,0,0}),
Ellipse(
extent={{-40,40},{40,-40}},
lineColor={0,0,0},
fillPattern=FillPattern.Sphere,
fillColor={0,128,255}),
fillColor={0,128,255},
pattern=LinePattern.None),
Line(
visible=use_HeatTransfer,
points={{-90,0},{-40,0}},
Expand Down Expand Up @@ -182,6 +162,12 @@ at the top of the column.
revisions="<html>
<ul>
<li>
February 27, 2024, by Michael Wetter:<br/>
Removed wrong annotation that used a non-existent parameter.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1842\">#1842</a>.
</li>
<li>
March 7, 2022, by Michael Wetter:<br/>
Set <code>final massDynamics=energyDynamics</code>.<br/>
This is for
Expand Down
2 changes: 1 addition & 1 deletion BuildingSystems/Airflow/Multizone/Table_m_flow.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ within BuildingSystems.Airflow.Multizone;
model Table_m_flow
"Mass flow(y-axis) vs Pressure(x-axis) cubic spline fit model based from table data, with last two points linearly interpolated"
extends BuildingSystems.Airflow.Multizone.BaseClasses.PartialOneWayFlowElement(
m_flow = BuildingSystems.Airflow.Multizone.BaseClasses.interpolate(
m_flow = BuildingSystems.Utilities.Math.Functions.interpolate(
u=dp,
xd=dpMea_nominal,
yd=mMea_flow_nominal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ block SkyClearness "Sky clearness"
Modelica.Blocks.Interfaces.RealInput zen(
quantity="Angle",
unit="rad",
displayUnit="degreeC") "Zenith angle of the sun beam"
displayUnit="deg") "Zenith angle of the sun beam"
annotation (Placement(transformation(extent={{-140,-80},{-100,-40}})));
Modelica.Blocks.Interfaces.RealInput HDifHor(quantity=
"RadiantEnergyFluenceRate", unit="W/m2")
Expand Down Expand Up @@ -66,6 +66,12 @@ is such that the regularization is usually not triggered.
</html>", revisions="<html>
<ul>
<li>
March 4, 2024, by Michael Wetter:<br/>
Corrected <code>displayUnit</code>.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1848\">IBPSA, #1848</a>.
</li>
<li>
September 6, 2021, by Ettore Zanetti:<br/>
Changed <code>lat</code> from being a parameter to an input from weather bus.<br/>
Changed input connector <code>HGloHor</code> to <code>HDirNor</code>.<br/>
Expand Down
39 changes: 39 additions & 0 deletions BuildingSystems/BoundaryConditions/WeatherData/Bus.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,40 @@ within BuildingSystems.BoundaryConditions.WeatherData;
expandable connector Bus "Data bus that stores weather data"
extends Modelica.Icons.SignalBus;

Modelica.Units.SI.Temperature TDryBul "Dry bulb temperature";
Modelica.Units.SI.Temperature TWetBul "Wet bulb temperature";
Modelica.Units.SI.Temperature TDewPoi "Dew point temperature";
Modelica.Units.SI.Temperature TBlaSky "Black-body sky temperature";

Real relHum(final unit="1") "Relative humidity";

Real HDirNor(final unit="W/m2") "Direct normal solar irradiation";
Real HGloHor(final unit="W/m2") "Global horizontal solar irradiation";
Real HDifHor(final unit="W/m2") "Diffuse horizontal solar irradiation";

Real HHorIR(final unit="W/m2") "Horizontal infrared irradiation";

Modelica.Units.SI.Angle winDir "Wind direction";
Modelica.Units.SI.Velocity winSpe "Wind speed";

Modelica.Units.SI.Height ceiHei "Cloud cover ceiling height";
Real nOpa(final unit="1") "Opaque sky cover";
Real nTot(final unit="1") "Total sky cover";

Modelica.Units.SI.Angle lat "Latitude of the location";
Modelica.Units.SI.Angle lon "Longitude of the location";
Modelica.Units.SI.Height alt "Location altitude above sea level";

Modelica.Units.SI.AbsolutePressure pAtm "Atmospheric pressure";

Modelica.Units.SI.Angle solAlt "Solar altitude angle";
Modelica.Units.SI.Angle solDec "Solar declination angle";
Modelica.Units.SI.Angle solHouAng "Solar hour angle";
Modelica.Units.SI.Angle solZen "Solar zenith angle";

Modelica.Units.SI.Time solTim "Solar time";
Modelica.Units.SI.Time cloTim "Model time";

annotation (
defaultComponentName="weaBus",
Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100,
Expand All @@ -16,6 +50,11 @@ This component is an expandable connector that is used to implement a bus that c
</html>", revisions="<html>
<ul>
<li>
September 22, 2023, by Michael Wetter:<br/>
Declared the variables that are on the bus.<br/>
This is for <a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1798\">IBPSA, #1798</a>.
</li>
<li>
June 25, 2010, by Wangda Zuo:<br/>
First implementation.
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ block SupplyReturnTemperatureReset

parameter Boolean use_TRoo_in = false
"Get the room temperature set point from the input connector"
annotation(Evaluate=true, HideResult=true);
annotation(Evaluate=true);
parameter Modelica.Units.SI.Temperature TRoo=293.15
"Fixed value of room temperature set point"
annotation (Dialog(enable=not use_TRoo_in));
Expand Down Expand Up @@ -86,8 +86,14 @@ shift the heating curve.
</html>", revisions="<html>
<ul>
<li>
March 11, 2024, by Michael Wetter:<br/>
Corrected use of <code>HideResult</code>.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1850\">#1850</a>.
</li>
<li>
January 03, 2020, by Jianjun Hu:<br/>
Changed name from <code>HotWaterTemperatureReset</code> to
Changed name from <code>HotWaterTemperatureReset</code> to
<code>SupplyReturnTemperatureReset</code>.<br/>
This is for
<a href=\"https://github.com/ibpsa/modelica-ibpsa/issues/1273\">#1273</a>.
Expand Down
Loading