Package with base classes for Buildings.BoundaryConditions.WeatherData
This package contains base classes that are used to construct the models in Buildings.BoundaryConditions.WeatherData.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Name | Description |
---|---|
CheckBlackBodySkyTemperature | Check the validity of the black-body sky temperature data |
CheckCeilingHeight | Ensures that the ceiling height is above a lower bound |
CheckIRRadiation | Ensure that the radiation is not smaller than 0 |
CheckPressure | Ensures that the interpolated pressure is between prescribed bounds |
CheckRadiation | Ensure that the radiation is not smaller than 0 |
CheckRelativeHumidity | Check the validity of relative humidity |
CheckSkyCover | Constrains the sky cover to [0, 1] |
CheckTemperature | Check the validity of temperature data |
CheckWindDirection | Constrains the wind direction to [0, 2*pi] degree |
CheckWindSpeed | Ensures that the wind speed is non-negative |
ConvertRadiation | Convert the unit of solar radiation received from the TMY3 data file |
ConvertRelativeHumidity | Convert the relative humidity from percentage to real |
ConvertTime | Converts the simulation time to calendar time in scale of 1 year (365 days) |
EquationOfTime | Equation of time |
LocalCivilTime | Converts the clock time to local civil time. |
SolarTime | Solar time |
getAbsolutePath | Gets the absolute path of a URI |
getHeaderElementTMY3 | Gets an element from the header of a TMY3 weather data file |
getLatitudeTMY3 | Gets the latitude from a TMY3 weather data file |
getLongitudeTMY3 | Gets the longitude from a TMY3 weather data file |
getTimeZoneTMY3 | Gets the time zone from a TMY3 weather data file |
Examples | Collection of models that illustrate model use and test models |
Check the validity of the black-body sky temperature data
This component checks the value of the black-body sky temperature.
If the temperature is outside TMin
and TMax
,
the simulation will stop with an error.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Default | Description |
---|---|---|---|
Temperature | TMin | 203.15 | Minimum allowed temperature [K] |
Temperature | TMax | 343.15 | Maximum allowed temperature [K] |
Type | Name | Description |
---|---|---|
input RealInput | TIn | Black-body sky temperature [K] |
output RealOutput | TOut | Black-body sky temperature [K] |
Ensures that the ceiling height is above a lower bound
This component ensures that the ceiling height is at least 0 meters.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Description |
---|---|---|
input RealInput | ceiHeiIn | Input ceiling height [m] |
output RealOutput | ceiHeiOut | Ceiling height [m] |
Ensure that the radiation is not smaller than 0
This block ensures that the radiation is not smaller than 0. The Modelica data reader will interpolate data when it reads the data from a file. Thus, it is possible to generate negative values due to the interpolation.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Description |
---|---|---|
input RealInput | HIn | Input horizontal infrared irradiation [W/m2] |
output RealOutput | HOut | Horizontal infrared irradiation [W/m2] |
Ensures that the interpolated pressure is between prescribed bounds
This component ensures that the interpolated pressure is between 31,000 Pa and 120,000 Pa.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Description |
---|---|---|
input RealInput | PIn | Input pressure [Pa] |
output RealOutput | POut | Atmospheric pressure [Pa] |
Ensure that the radiation is not smaller than 0
This block ensures that the radiation is not smaller than 0. The Modelica data reader will interpolate data when it reads the data from a file. Thus, it is possible to generate negative values due to the interpolation.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Description |
---|---|---|
input RealInput | HIn | Input radiation [W/m2] |
output RealOutput | HOut | Radiation [W/m2] |
Check the validity of relative humidity
This component constrains the value of relative humidity to a range of [0, 1].
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Description |
---|---|---|
input RealInput | relHumIn | Input relative humidity [1] |
output RealOutput | relHumOut | Relative humidity [1] |
Constrains the sky cover to [0, 1]
This component constrains the interpolated sky cover between 0 and 1.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Description |
---|---|---|
input RealInput | nIn | Input sky cover [0, 10] |
output RealOutput | nOut | Sky cover [0, 1] [1] |
Check the validity of temperature data
This component checks the value of temperature.
If the temperature is outside TMin
and TMax
,
the simulation will stop with an error.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Default | Description |
---|---|---|---|
Temperature | TMin | 203.15 | Minimum allowed temperature [K] |
Temperature | TMax | 343.15 | Maximum allowed temperature [K] |
Type | Name | Description |
---|---|---|
input RealInput | TIn | Input Temperature [K] |
output RealOutput | TOut | Output temperature [K] |
Constrains the wind direction to [0, 2*pi] degree
This component constrains the interpolated wind direction between 0 and 360 degree.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Description |
---|---|---|
input RealInput | nIn | Input wind direction [rad] |
output RealOutput | nOut | Wind direction [rad] |
Ensures that the wind speed is non-negative
This component ensures that the wind speed is non-negative.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Description |
---|---|---|
input RealInput | winSpeIn | Input wind speed [m/s] |
output RealOutput | winSpeOut | Wind speed [m/s] |
Convert the unit of solar radiation received from the TMY3 data file
The TMY3 data for solar radiation is the radiation accumulated in one hour. Thus, it used a unit of Wh/m2
.
This component converts Wh/m2
to W/m2
that is the standard unit in Modelica.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Description |
---|---|---|
input RealInput | HIn | Input radiation [W.h/m2] |
output RealOutput | HOut | Radiation [W/m2] |
Convert the relative humidity from percentage to real
This component converts the relative humidity from percentage to real. Input is the relative humidity in percentage, as this is the data format that is used in the Typical Meteorological Year weather data.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Description |
---|---|---|
input RealInput | relHumIn | Value of relative humidity in percentage [1] |
output RealOutput | relHumOut | Relative humidity between 0 and 1 [1] |
Converts the simulation time to calendar time in scale of 1 year (365 days)
This component converts the simulation time to calendar time in a scale of 1 year (365 days).
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Description |
---|---|---|
input RealInput | modTim | Simulation time [s] |
output RealOutput | calTim | Calendar time [s] |
Equation of time
This component computes the difference between solar noon and noon of local civic time.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Description |
---|---|---|
input RealInput | nDay | Zero-based day number in seconds (January 1=0, January 2=86400) [s] |
output RealOutput | eqnTim | Equation of time [s] |
Converts the clock time to local civil time.
This component converts the clock time to local civil time.
The parameter timZon
represents the time zone of the facility (relative to Greenwich Mean Time or the 0th meridian). Time zones west of GMT (e.g. North America) are represented as negative;
east of GMT as positive. Fraction of hours are represented in decimals (e.g. for 6:30, use 6.5).
The formula is based on Michael Wetter's thesis (A4.1):
locTim = greTim + (lon*180/pi)*86400/360 = cloTim - timZon + lon*43200/pi
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Default | Description |
---|---|---|---|
Time | timZon | Time zone [s] | |
Angle | lon | Longitude [rad] |
Type | Name | Description |
---|---|---|
input RealInput | cloTim | Clock time [s] |
output RealOutput | locTim | Local civil time [s] |
Solar time
This component computes the local solar time.
Note: To avoid events, this block does not convert solar time to a scale of 24 hours.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Type | Name | Description |
---|---|---|
input RealInput | locTim | Local time [s] |
input RealInput | equTim | Equation of time [s] |
output RealOutput | solTim | Solar time [s] |
Gets the absolute path of a URI
This function returns the absolute path of the uniform resource identifier by searching for a file with the name
file://uri modelica://uri modelica://Buildings/uri
The function returns the absolute path of the first file that is found, using the above search order.
If the file is not found, then this function terminates with an assert
.
This function has been introduced to allow users to specify the name of weather data files with a path that is relative to the library path. This allows users to change the current working directory while still being able to read the files.
Type | Name | Default | Description |
---|---|---|---|
String | uri | A uri |
Type | Name | Description |
---|---|---|
String | path | The absolute path of the file pointed to by the URI |
Gets an element from the header of a TMY3 weather data file
startwhere
start
is a parameter.
When this line is found, the function returns the element at the position number
position
, where position
is a parameter.
A comma is used as the delimiter of the elements.
Type | Name | Default | Description |
---|---|---|---|
String | filNam | Name of weather data file | |
String | start | Start of the string that contains the elements | |
String | name | Name of data element, used in error reporting | |
Integer | position | Position of the element on the line that contains 'start' |
Type | Name | Description |
---|---|---|
String | element | Element at position 'pos' of the line that starts with 'start' |
Gets the latitude from a TMY3 weather data file
Type | Name | Default | Description |
---|---|---|---|
String | filNam | Name of weather data file |
Type | Name | Description |
---|---|---|
Angle | lat | Latitude from the weather file [rad] |
Gets the longitude from a TMY3 weather data file
Type | Name | Default | Description |
---|---|---|---|
String | filNam | Name of weather data file |
Type | Name | Description |
---|---|---|
Angle | lon | Longitude from the weather file [rad] |
Gets the time zone from a TMY3 weather data file
Type | Name | Default | Description |
---|---|---|---|
String | filNam | Name of weather data file |
Type | Name | Description |
---|---|---|
Time | timZon | Time zone from the weather file [s] |