blockConvertTime
Converts the simulation time to calendar time in scale of 1 year (365 days), or a multiple of a year
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 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.
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 |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput | modTim | Simulation time | |
| Modelica.Blocks.Interfaces.RealOutput | calTim | Calendar 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. -
April 15, 2020, by Michael Wetter:
AddednoEventto assertion to remove zero crossing function in OPTIMICA. -
January 29, 2020, by Filip Jorissen:
Revised end time assert and added assert that verifies whether the time is before the start time of the weather file.
This is for #1281. -
June 12, 2019, by Michael Wetter:
Reformulated model to avoid having to evaluate the weather file during compilation (as it determined the structural parameterlenWea). The new formulation allows inclusion of the weather file in JModelica-generated FMUs, and it works with Dymola as well.
This is for #1147. -
May 21, 2019, by Michael Wetter:
Corrected code to avoid wrong type conversion.
This is for #1142. -
March 4, 2019, by Michael Wetter:
Refactored implementation to correctly account for negative start times.
This is for #842. -
July 27, 2018, by Ana Constantin:
Added shift for multiple time spans. -
September 27, 2011, by Wangda Zuo and Michael Wetter:
Modify it to convert negative value of time. Use the when-then to allow dymola differentiating this model when conducting index reduction which is not allowed in previous implementation. -
February 27, 2011, by Wangda Zuo:
Renamed the component. -
July 08, 2010, by Wangda Zuo:
First implementation.