Buildings.ThermalZones.EnergyPlus.BaseClasses
Package with base classes for Buildings.ThermalZones.EnergyPlus
Information
This package contains base classes that are used to construct the models in Buildings.ThermalZones.EnergyPlus.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name | Description |
---|---|
PartialEnergyPlusObject | Partial definitions of an EnergyPlus object |
SpawnExternalObject | Class used to couple the FMU to interact with a thermal zone |
ThermalZoneAdapter | Block that interacts with this EnergyPlus zone |
exchange | Exchange the values with the EnergyPlus thermal zone |
getParameters | Get parameters for an EnergyPlus object |
getUnitAsString | Return the unit enumeration as a string |
initialize | Initialization for an EnergyPlus thermal zone |
Synchronize | Package with classes to synchronize Spawn objects |
buildingsLibraryRoot=Modelica.Utilities.Strings.substring(string=legalFileLocation, startIndex=1, endIndex=Modelica.Utilities.Strings.length(legalFileLocation) - 11) | Root directory of the Buildings library (used to find the spawn executable) |
legalFileLocation=Modelica.Utilities.Files.fullPathName(Modelica.Utilities.Files.loadResource("modelica://Buildings/legal.html")) | Location of legal.html file (used to find the spawn executable) |
Validation | Collection of validation models |
Types and constants
constant String buildingsLibraryRoot= Modelica.Utilities.Strings.substring( string=legalFileLocation, startIndex=1, endIndex=Modelica.Utilities.Strings.length(legalFileLocation)-11) "Root directory of the Buildings library (used to find the spawn executable)";
constant String legalFileLocation = Modelica.Utilities.Files.fullPathName(Modelica.Utilities.Files.loadResource("modelica://Buildings/legal.html")) "Location of legal.html file (used to find the spawn executable)";
Buildings.ThermalZones.EnergyPlus.BaseClasses.PartialEnergyPlusObject
Partial definitions of an EnergyPlus object
Information
Partial model for an EnergyPlus object.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Modelica definition
Buildings.ThermalZones.EnergyPlus.BaseClasses.SpawnExternalObject
Class used to couple the FMU to interact with a thermal zone
Information
Class derived from ExternalObject
having two local external function definition,
named destructor
and constructor
respectively.
These functions create and release an external object that allows the storage of the data structure needed to communicate with the EnergyPlus FMU.
Extends from ExternalObject.
Modelica definition
Buildings.ThermalZones.EnergyPlus.BaseClasses.ThermalZoneAdapter
Block that interacts with this EnergyPlus zone
Information
Block that exchanges data between Modelica and EnergyPlus.
This block is calling the C functions to initialize EnergyPlus,
exchange data with EnergyPlus, and free the memory, through the destructor
of its class adapter
, of EnergyPlus.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block), Buildings.ThermalZones.EnergyPlus.BaseClasses.Synchronize.ObjectSynchronizer (Block that synchronizes an object).
Parameters
Type | Name | Default | Description |
---|---|---|---|
String | modelicaNameBuilding | Name of the building to which this thermal zone belongs to | |
String | idfName | Name of the IDF file that contains this zone | |
String | weaName | Name of the Energyplus weather file | |
Real | relativeSurfaceTolerance | Relative tolerance of surface temperature calculations | |
String | zoneName | Name of the thermal zone as specified in the EnergyPlus input | |
Integer | nFluPor | Number of fluid ports (Set to 2 for one inlet and one outlet) | |
Debug | |||
Boolean | usePrecompiledFMU | false | Set to true to use pre-compiled FMU with name specified by fmuName |
String | fmuName | "" | Specify if a pre-compiled FMU should be used instead of EnergyPlus (mainly for development) |
LogLevels | logLevel | Buildings.ThermalZones.Energ... | LogLevels of EnergyPlus output |
Connectors
Type | Name | Description |
---|---|---|
input RealInput | T | Zone air temperature [K] |
input RealInput | X_w | Zone air mass fraction in kg/kg total air [kg/kg] |
input RealInput | m_flow[nFluPor] | Mass flow rate [kg/s] |
input RealInput | TInlet[nFluPor] | Air inlet temperatures [K] |
input RealInput | QGaiRad_flow | Radiative heat gain [W] |
output RealOutput | TRad | Radiative temperature [K] |
output RealOutput | QCon_flow | Convective sensible heat to be added to zone air [W] |
output RealOutput | QLat_flow | Latent heat to be added to zone air [W] |
output RealOutput | QPeo_flow | Total heat gain from people, to be used for optional computation of CO2 released [W] |
Modelica definition
Buildings.ThermalZones.EnergyPlus.BaseClasses.exchange
Exchange the values with the EnergyPlus thermal zone
Information
External function that exchanges data with EnergyPlus.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
SpawnExternalObject | adapter | External object | |
Boolean | initialCall | Set to true if initial() is true, false otherwise | |
Integer | nY | Size of output y | |
Real | u[:] | Input values. First all inputs, then the current model time | |
Real | dummy | Dummy value (used to force Modelica tools to call initialize()) |
Outputs
Type | Name | Description |
---|---|---|
Real | y[nY] | Output values. First all outputs, then all derivatives, then next event time |
Modelica definition
Buildings.ThermalZones.EnergyPlus.BaseClasses.getParameters
Get parameters for an EnergyPlus object
Information
External function that obtains parameters from the EnergyPlus FMU and returns them to Modelica.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
SpawnExternalObject | adapter | External object | |
Integer | nParOut | Number of elements in parOut | |
Real | isSynchronized | Set to variable that is used to synchronize the objects |
Outputs
Type | Name | Description |
---|---|---|
Real | parOut[nParOut] | Parameter values returned from EnergyPlus |
Modelica definition
Buildings.ThermalZones.EnergyPlus.BaseClasses.getUnitAsString
Return the unit enumeration as a string
Information
Function that returns the string representation of a unit enumeration from Buildings.ThermalZones.EnergyPlus.Types.Units.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
Units | unit | Unit as enumeration value |
Outputs
Type | Name | Description |
---|---|---|
String | unitAsString | String representation of the unit |
Modelica definition
Buildings.ThermalZones.EnergyPlus.BaseClasses.initialize
Initialization for an EnergyPlus thermal zone
Information
External function that generates the EnergyPlus FMU.
Extends from Modelica.Icons.Function (Icon for functions).
Inputs
Type | Name | Default | Description |
---|---|---|---|
SpawnExternalObject | adapter | External object | |
Real | isSynchronized | Set to variable that is used to synchronize the objects |
Outputs
Type | Name | Description |
---|---|---|
Integer | nObj | Returns 1 from C, used to force synchronization |