blockLocalCivilTime
Converts the clock time to local civil time.
Extends from PartialConvertTime (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 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
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Time | weaDatStaTim (from PartialConvertTime) | 0 | Start time of weather data |
| Modelica.Units.SI.Time | weaDatEndTim (from PartialConvertTime) | 31536000 | End time of weather data |
| Modelica.Units.SI.Time | timZon | Time zone | |
| Modelica.Units.SI.Angle | lon | Longitude |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput | cloTim | Clock time | |
| Modelica.Blocks.Interfaces.RealOutput | locTim | Local civil time |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Time | modTimAux (from PartialConvertTime) | Model time | |
| Modelica.Units.SI.Time | calTimAux (from PartialConvertTime) | Calendar time |
Revisions
-
March 27, 2023, by Ettore Zanetti:
Updated to use partial class for conversion from simulation time to calendar time.
This is for IBPSA #1716. -
November 14, 2015, by Michael Wetter:
Introduceddiff. -
February 27, 2011, by Wangda Zuo:
First implementation.