Buildings.BoundaryConditions.WeatherData.BaseClasses
Package with base classes for Buildings.BoundaryConditions.WeatherData
Information
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).
Package Content
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 |
Buildings.BoundaryConditions.WeatherData.BaseClasses.CheckBlackBodySkyTemperature
Check the validity of the black-body sky temperature data
Information
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).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Temperature | TMin | 203.15 | Minimum allowed temperature [K] |
Temperature | TMax | 343.15 | Maximum allowed temperature [K] |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | TIn | Black-body sky temperature [K] |
output RealOutput | TOut | Black-body sky temperature [K] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.CheckCeilingHeight
Ensures that the ceiling height is above a lower bound
Information
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).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | ceiHeiIn | Input ceiling height [m] |
output RealOutput | ceiHeiOut | Ceiling height [m] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.CheckIRRadiation
Ensure that the radiation is not smaller than 0
Information
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).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | HIn | Input horizontal infrared irradiation [W/m2] |
output RealOutput | HOut | Horizontal infrared irradiation [W/m2] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.CheckPressure
Ensures that the interpolated pressure is between prescribed bounds
Information
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).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | PIn | Input pressure [Pa] |
output RealOutput | POut | Atmospheric pressure [Pa] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.CheckRadiation
Ensure that the radiation is not smaller than 0
Information
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).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | HIn | Input radiation [W/m2] |
output RealOutput | HOut | Radiation [W/m2] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.CheckRelativeHumidity
Check the validity of relative humidity
Information
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).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | relHumIn | Input relative humidity [1] |
output RealOutput | relHumOut | Relative humidity [1] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.CheckSkyCover
Constrains the sky cover to [0, 1]
Information
This component constrains the interpolated sky cover between 0 and 1.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | nIn | Input sky cover [0, 10] |
output RealOutput | nOut | Sky cover [0, 1] [1] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.CheckTemperature
Check the validity of temperature data
Information
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).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Temperature | TMin | 203.15 | Minimum allowed temperature [K] |
Temperature | TMax | 343.15 | Maximum allowed temperature [K] |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | TIn | Input Temperature [K] |
output RealOutput | TOut | Output temperature [K] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.CheckWindDirection
Constrains the wind direction to [0, 2*pi] degree
Information
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).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | nIn | Input wind direction [rad] |
output RealOutput | nOut | Wind direction [rad] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.CheckWindSpeed
Ensures that the wind speed is non-negative
Information
This component ensures that the wind speed is non-negative.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | winSpeIn | Input wind speed [m/s] |
output RealOutput | winSpeOut | Wind speed [m/s] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.ConvertRadiation
Convert the unit of solar radiation received from the TMY3 data file
Information
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).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | HIn | Input radiation [W.h/m2] |
output RealOutput | HOut | Radiation [W/m2] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.ConvertRelativeHumidity
Convert the relative humidity from percentage to real
Information
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).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | relHumIn | Value of relative humidity in percentage [1] |
output RealOutput | relHumOut | Relative humidity between 0 and 1 [1] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.ConvertTime
Converts the simulation time to calendar time in scale of 1 year (365 days)
Information
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).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | modTim | Simulation time [s] |
output RealOutput | calTim | Calendar time [s] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.EquationOfTime
Equation of time
Information
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).
Connectors
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] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.LocalCivilTime
Converts the clock time to local civil time.
Information
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).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Time | timZon | Time zone [s] | |
Angle | lon | Longitude [rad] |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | cloTim | Clock time [s] |
output RealOutput | locTim | Local civil time [s] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.SolarTime
Solar time
Information
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).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | locTim | Local time [s] |
input RealInput | equTim | Equation of time [s] |
output RealOutput | solTim | Solar time [s] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.getAbsolutePath
Gets the absolute path of a URI
Information
The function returns the absolute path of a
uniform resource identifier (URI) or local file name.
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.
Inputs
Type | Name | Default | Description |
---|---|---|---|
String | uri | A URI |
Outputs
Type | Name | Description |
---|---|---|
String | path | The absolute path of the file pointed to by the URI |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.getHeaderElementTMY3
Gets an element from the header of a TMY3 weather data file
Information
This function scans the weather data file for a line that starts with the stringstartwhere
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.
Inputs
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' |
Outputs
Type | Name | Description |
---|---|---|
String | element | Element at position 'pos' of the line that starts with 'start' |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.getLatitudeTMY3
Gets the latitude from a TMY3 weather data file
Information
This function returns the latitude of the TMY3 weather data file.Inputs
Type | Name | Default | Description |
---|---|---|---|
String | filNam | Name of weather data file |
Outputs
Type | Name | Description |
---|---|---|
Angle | lat | Latitude from the weather file [rad] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.getLongitudeTMY3
Gets the longitude from a TMY3 weather data file
Information
This function returns the longitude of the TMY3 weather data file.Inputs
Type | Name | Default | Description |
---|---|---|---|
String | filNam | Name of weather data file |
Outputs
Type | Name | Description |
---|---|---|
Angle | lon | Longitude from the weather file [rad] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.getTimeZoneTMY3
Gets the time zone from a TMY3 weather data file
Information
This function returns the time zone of the TMY3 weather data file.Inputs
Type | Name | Default | Description |
---|---|---|---|
String | filNam | Name of weather data file |
Outputs
Type | Name | Description |
---|---|---|
Time | timZon | Time zone from the weather file [s] |