impure functionconstructor
Construct to connect to a thermal zone in EnergyPlus
Extends from Modelica.Icons.Function (Icon for functions).
Information
The function constructor is a C function that is called by a Modelica simulator
exactly once during the initialization.
The function returns the object adapter that
will be used to store the data structure needed to communicate with EnergyPlus.
Inputs
| Type | Name | Default | Description |
|---|---|---|---|
| Integer | objectType | Type of the object (1: ThermalZone, 2: Schedule, 3: Actuator, 4: Surface) | |
| Modelica.Units.SI.Time | startTime | Start time of the simulation | |
| String | modelicaNameBuilding | Name of this Modelica building instance that connects to this thermal zone | |
| String | modelicaInstanceName | Name of the Modelica instance of this object | |
| String | spawnExe | Name of the spawn executable, without extension, such as spawn-0.2.0-d7f1e095f3 | |
| String | idfVersion | IDF version with underscores, such as 24_2_0 | |
| String | idfName | Name of the IDF | |
| String | epwName | Name of the weather file | |
| Buildings.ThermalZones.EnergyPlus_24_2_0.Data.RunPeriod | runPeriod | EnergyPlus RunPeriod configuration | |
| Real | relativeSurfaceTolerance | Relative tolerance of surface temperature calculations | |
| String | epName | Name of the object in EnergyPlus | |
| Boolean | usePrecompiledFMU | Set to true to use precompiled FMU with name specified by input fmuName | |
| String | fmuName | Specify if a pre-compiled FMU should be used instead of EnergyPlus (mainly for development) | |
| String | buildingsRootFileLocation | Name of top-level legal.html file of the Buildings library (used to find the spawn executable) | |
| Buildings.ThermalZones.EnergyPlus_24_2_0.Types.LogLevels | logLevel | LogLevels of EnergyPlus output | |
| Boolean | printUnit | Set to true to print units for OutputVariable object. Must be false for all other objects | |
| String | jsonName | Name of the object in the json configuration file | |
| String | jsonKeysValues | Keys and values string to be written to the json configuration file | |
| String[nParOut] | parOutNames | Names of parameter in modelDescription.xml file | |
| String[nParOut] | parOutUnits | Modelica units of the parameters | |
| Integer | nParOut | Number of parameters | |
| String[nInp] | inpNames | Names of inputs in modelDescription.xml file | |
| String[nInp] | inpUnits | Modelica units of the inputs | |
| Integer | nInp | Size of inpNames | |
| String[nOut] | outNames | Names of outputs in modelDescription.xml file | |
| String[nOut] | outUnits | Modelica units of the outputs | |
| Integer | nOut | Size of outNames | |
| Integer[nDer,2] | derivatives_structure | List of derivatives (1-based index, [i,j] means dy_i/du_j | |
| Integer | nDer | Size of derivatives | |
| Real[nDer] | derivatives_delta | Increments for derivative calculation |
Outputs
| Type | Name | Default | Description |
|---|---|---|---|
| SpawnExternalObject | adapter |
Revisions
-
July 10, 2026, by Michael Wetter:
Corrected C function implementation to comply with Modelica Language Standard.
This change only affects the C function implementation and does not impact the Modelica function signature.
This is for issue 4658. -
April 21, 2022, by Michael Wetter:
Added support for EnergyPlusRunPeriodobject.
This is for #2926. -
December 11, 2021, by Michael Wetter:
Declared function asimpurefor MSL 4.0.0. -
February 18, 2021, by Michael Wetter:
Refactor synchronization of constructors.
This is for #2360. -
February 14, 2018, by Michael Wetter:
First implementation.