Formats the dataframe to generic bim2sim output structure.
This function:
adds the space GUIDs or bim2sim aggregated room names to the results
selects only the selected simulation outputs from the result
sets the index to the format MM/DD-hh:mm:ss
uses absolute values instead negative ones for cooling
Args:
df_original: original dataframe directly taken from simulation
bim2sim_teaser_mapping: dict[simulation var name:
relevant_vars: list of simulation variables to have in dataframe
Returns:
df_final: converted dataframe in bim2sim result structure
Dymola outputs the results just via a counting of zones/rooms
starting with [1]. This function adds the real zone/space guids or
aggregation names to the dict for easy readable results.
Rooms are mapped with their space GUID, aggregated zones are mapped
with their zone name. Therefore, we load the additional information
like what spaces are aggregated from elements structure.
Args:
bim2sim_teaser_mapping_selected: dict holds the mapping between
simulation outputs and generic bim2sim output names. Only
outputs selected via sim_results sim-setting are included.
elements: dict[guid: element]
Returns:
dict: A mapping between simulation results and space guids, with
The created dataframe holds the data for the generic plot
functionality for BEPS simulation in bim2sim post-processing,
regardless if the simulation results come from TEASER
or EnergyPlus. Therefore, the simulation results are mapped into a
generic form with unified timestamps and only the results wanted,
defined by the sim_settings, are exported to the dataframe.
Args:
teaser_mat_result_paths: path to simulation result file
bldg_names (list): list of all buildings
elements: bim2sim elements created based on ifc data
Returns:
df_final: final dataframe that holds only relevant data, with
generic bim2sim names and index in form of MM/DD-hh:mm:ss
rotates entire building and its components for a given true north
value, only necessary if ifc file true north information its not
given, but want to rotate before exporting
Creates the TEASER project based on bim2sim elements.
The previous created and enriched bim2sim elements are used to
parametrize a TEASER project instance. Therefore we map each bim2sim
element to it’s corresponding TEASER element.
Args:
libraries: previous loaded libraries. In the case this is the
TEASER library
elements: dict[guid: element] with bim2sim elements
weather_file: path to weather file
Returns:
teaser_prj: teaser project instance
bldg_names: list of names of all buildings in project, needed to
maintain the information for later tasks
orig_heat_loads: dict[tz.name: heat_load] with original heat loads
as they get overwritten
orig_cool_loads: dict[tz.name: cool_load] with original cool loads
as they get overwritten
tz_mapping: dict that holds mapping between thermal zones in TEASER
and thermal zones in IFC for later post-processing
This is the final export task that exports the created TEASER project
into Modelica by using TEASERs inbuilt export functionality. Currently,
the export will be done to AixLib, potentially the export_ibpsa()
functionality could be used as well.
Loads existing Modelica results from a previous simulation.
The .mat file from a previous simulation is loaded and stored in the
playground state. The intended behaviour is that for the following
tasks with post-processing and plotting there should be no difference
if a total bim2sim plugin run is performed or the existing results are
loaded.
Returns:
bldg_names: list of building names
sim_results_path: path where to store the plots
Simulates the exported TEASER model by using ebcpy.
The Modelica model that is created through TEASER is simulated by using
ebcpy and its DymolaAPI. Modelica/Dymola stores simulation results
in .mat files which are stored in the export folder of the bim2sim
project.
Args:
bldg_names: bldg_names: list of names of all buildings in project
Returns:
teaser_mat_result_paths: dict[bldg_name: mat result path] where for
each building the corresponding result is stored
sim_results_path: path where the sim results are stored, including