Skip to content

Commit

Permalink
Merge pull request #1799 from ibpsa/issue1798_weatherBusVariables
Browse files Browse the repository at this point in the history
Declared variables on weather bus
  • Loading branch information
mwetter authored Sep 29, 2023
2 parents c5f8684 + 89794ec commit 2ca68cf
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
39 changes: 39 additions & 0 deletions IBPSA/BoundaryConditions/WeatherData/Bus.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,40 @@ within IBPSA.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
2 changes: 1 addition & 1 deletion IBPSA/Examples/Tutorial/SimpleHouse/SimpleHouse2.mo
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow</a>
To be able to use the value of the outdoor solar irradiance
you will need to access the weather data reader.
To do this, make a connection to the <code>weaBus</code>.
In the dialog box select <i>&lt;New Variable&gt;</i> and here type <code>HDirNor</code>,
In the dialog box, select <code>HDirNor</code>,
which is the direct solar irradiance on a surface of <i>1 m<sup>2</sup></i>,
perpendicular to the sun rays.
Set the gain factor <code>k</code> to 2,
Expand Down

0 comments on commit 2ca68cf

Please sign in to comment.