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

Declared variables on weather bus #1799

Merged
merged 5 commits into from
Sep 29, 2023
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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