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 |
CheckDewPointTemperature | Check the validity of the dew point temperature data |
CheckDryBulbTemperature | Check the validity of the dry bulb temperature data |
CheckPressure | Ensures that the interpolated pressure is between prescribed bounds |
ConvertTime | Converts the simulation time to calendar time in scale of 1 year (365 days), or a multiple of a year |
EquationOfTime | Equation of time |
LimiterCeilingHeight | Block that limits the relative humidity |
LimiterHorizontalInfraredIrradiation | Block that limits the horizontal infrared irradiation |
LimiterOpaqueSkyCover | Block that limits the opaque sky cover |
LimiterRelativeHumidity | Block that limits the relative humidity |
LimiterTotalSkyCover | Block that limits the total sky cover |
LimiterWindDirection | Block that limits the wind direction |
LimiterWindSpeed | Block that limits the wind speed |
LocalCivilTime | Converts the clock time to local civil time. |
PartialLimiter | Partial block to limit a signal |
PartialLimiterMin | Partial block to limit a signal |
SolarTime | Solar time |
SourceSelector | Block that selects as its output either a parameter value or its input |
SourceSelectorRadiation | Block that selects the solar radiation source and outputs the solar radiation quantities |
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 |
getTimeSpanTMY3 | Get the time span of the weather data from the 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 | TBlaSky | Black-body sky temperature [K] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.CheckDewPointTemperature
Check the validity of the dew point 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 | TDewPoi | Dew point temperature [K] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.CheckDryBulbTemperature
Check the validity of the dry bulb temperature data
Information
This component checks the value of the dry bulb 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 | TDryBul | Dry bulb temperature [K] |
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 | Atmospheric pressure [Pa] |
output RealOutput | pAtm | Atmospheric pressure [Pa] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.ConvertTime
Converts the simulation time to calendar time in scale of 1 year (365 days), or a multiple of a year
Information
This component converts the simulation time to calendar time in a scale of 1 year (365 days), or a multiple of it, if this is the length of the weather file.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Parameters
Type | Name | Default | Description |
---|---|---|---|
Time | weaDatStaTim | weaDatStaTim(displayUnit="d") | Start time of weather data [s] |
Time | weaDatEndTim | weaDatEndTim(displayUnit="d") | End time of weather data [s] |
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.LimiterCeilingHeight
Block that limits the relative humidity
Information
Block that limits the cloud cover ceiling height to be positive.
This block is used because interpolation of weather data can lead to slightly negative values.
Extends from PartialLimiterMin (Partial block to limit a signal).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
output RealOutput | ceiHei | Cloud cover ceiling height [m] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.LimiterHorizontalInfraredIrradiation
Block that limits the horizontal infrared irradiation
Information
Block that limits the horizontal infrared irradiation to be positive.
This block is used because interpolation of weather data can lead to slightly negative values.
Extends from PartialLimiterMin (Partial block to limit a signal).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
output RealOutput | HHorIR | Horizontal infrared irradiation [W/m2] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.LimiterOpaqueSkyCover
Block that limits the opaque sky cover
Information
Block that limits the opaque sky cover.
This block is used because interpolation of weather data can lead to slightly negative values.
Extends from PartialLimiter (Partial block to limit a signal).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
output RealOutput | nOpa | Opaque sky cover [1] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.LimiterRelativeHumidity
Block that limits the relative humidity
Information
Block that limits the relative humidity.
This block is used because interpolation of weather data can lead to slightly negative values.
Extends from PartialLimiter (Partial block to limit a signal).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
output RealOutput | relHum | Relative humidity [1] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.LimiterTotalSkyCover
Block that limits the total sky cover
Information
Block that limits the total sky cover.
This block is used because interpolation of weather data can lead to slightly negative values.
Extends from PartialLimiter (Partial block to limit a signal).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
output RealOutput | nTot | Total sky cover [1] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.LimiterWindDirection
Block that limits the wind direction
Information
Block that limits the wind direction.
This block is used because interpolation of weather data can lead to slightly negative values.
Extends from PartialLimiter (Partial block to limit a signal).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
output RealOutput | winDir | Wind direction [rad] |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.LimiterWindSpeed
Block that limits the wind speed
Information
Block that limits the wind speed to be positive.
This block is used because interpolation of weather data can lead to slightly negative values.
Extends from PartialLimiterMin (Partial block to limit a signal).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
output RealOutput | winSpe | Wind speed [m/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 | timZon(displayUnit="h") | Time zone [s] |
Angle | lon | lon(displayUnit="deg") | 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.PartialLimiter
Partial block to limit a signal
Information
Block that computes y_internal=min(uMax, max(uMin, u),
where y_internal
is a protected connector.
This block is used because interpolation of weather data can lead to a slight overshoot of values. This block is extended by other blocks that then provide the output connector. Extending this block is needed for the output connector to have the correct comment string in the weather data bus, because the weather data bus displays the comment string of the output signal that is connected to the weather data bus. Without this construct, the weather data bus would simply show "Connector of Real output signal".
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.PartialLimiterMin
Partial block to limit a signal
Information
Partial block that is used to limit a signal by a minimum value.
This block is used because interpolation of weather data can lead to slightly negative values. This block is extended by other blocks that then provide the output connector. Extending this block is needed for the output connector to have the correct comment string in the weather data bus, because the weather data bus displays the comment string of the output signal that is connected to the weather data bus. Without this construct, the weather data bus would simply show "Connector of Real output signal".
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Connectors
Type | Name | Description |
---|---|---|
input RealInput | u | Connector of Real input signal |
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.SourceSelector
Block that selects as its output either a parameter value or its input
Information
Block that produces at its output the input value uCon
, uFil
or the parameter value p
depending on the parameter value
datSou
.
Extends from Modelica.Blocks.Interfaces.SO (Single Output continuous control block).
Parameters
Type | Name | Default | Description |
---|---|---|---|
DataSource | datSou | Data source | |
Real | p | Parameter value |
Connectors
Type | Name | Description |
---|---|---|
output RealOutput | y | Connector of Real output signal |
input RealInput | uFil | Input signal from file reader |
input RealInput | uCon | Input signal from input connector |
Modelica definition
Buildings.BoundaryConditions.WeatherData.BaseClasses.SourceSelectorRadiation
Block that selects the solar radiation source and outputs the solar radiation quantities
Information
Block that outputs the direct normal, diffuse horizontal and diffuse global solar irradiation. This block computes these output quantities based on conditionally provided input signals.
The computations are based on Wetter (2004).
References
-
Michael Wetter.
Simulation-based Building Energy Optimization.
Dissertation. University of California at Berkeley. 2004.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Parameters
Type | Name | Default | Description |
---|---|---|---|
RadiationDataSource | datSou | Data source |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | HDirNorFil | Direct normal solar irradiation from weather data file [W/m2] |
input RealInput | HDirNorIn | Direct normal solar irradiation from input connector [W/m2] |
input RealInput | HDifHorFil | Diffuse horizontal solar irradiation from weather data file [W/m2] |
input RealInput | HDifHorIn | Diffuse horizontal solar irradiation from input connector [W/m2] |
input RealInput | HGloHorFil | Global horizontal solar irradiation from weather data file [W/m2] |
input RealInput | HGloHorIn | Global horizontal solar irradiation from input connector [W/m2] |
input RealInput | zen | Zenith angle [rad] |
output RealOutput | HDirNor | Direct normal solar irradiation [W/m2] |
output RealOutput | HDifHor | Diffuse horizontal solar irradiation [W/m2] |
output RealOutput | HGloHor | Global horizontal solar irradiation [W/m2] |
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.
Extends from Modelica.Icons.Function (Icon for functions).
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.
Extends from Modelica.Icons.Function (Icon for functions).
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(min=1) | 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.Extends from Modelica.Icons.Function (Icon for functions).
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.Extends from Modelica.Icons.Function (Icon for functions).
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.getTimeSpanTMY3
Get the time span of the weather data from the file
Information
This function returns the start time (first time stamp) and end time (last time stamp plus average increment) of the TMY3 weather data file.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
String | filNam | Name of weather data file | |
String | tabNam | Name of table on weather file |
Outputs
Type | Name | Description |
---|---|---|
Time | timeSpan[2] | Start time, end time of weather data [s] |
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.Extends from Modelica.Icons.Function (Icon for functions).
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] |