.Annex60.Utilities.Time.CalendarTime

Information

This blocks computes the unix time stamp, date and time and the day of the week based on the Modelica variable time.

Main equations

First the unix time stamp corresponding to the current time is computed. From this variables the corresponding, year, date and time are computed using functions such as floor() and ceil().

Assumption and limitations

The implementation only supports date computations from year 2010 up to and including 2020. Daylight saving and time zones are not supported.

Typical use and important parameters

The user must define which time and date correspond to time = 0 using the model parameters zerTim, and, if zerTim==Annex60.Utilities.Time.Types.ZeroTime.Custom, the parameter yearRef. The user can choose from new year, midnight for a number of years: 2010 to 2020 and also 1970. The latter corresponds to a unix stamp of 0. (Note that when choosing the reference time equal to 0 at 1970, the actual simulation time must be within the 2010-2020 range. For instance startTime = 1262304000 corresponds to the simulation starting on the 1st of January 2010 when setting zerTim = ZeroTime.UnixTimeStamp. This is within the 2010-2020 range and is therefore allowed.)

Implementation

The model was implemented such that no events are being generated for computing the minute of the day. The model also contains an implementation for setting time=0 for any day and month other than January first. This is however not activated in the current model since these options may wrongly give the impression that it changes the time based on which the solar position is computed and TMY3 data are read.

Revisions


Generated at 2024-04-16T18:15:49Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos