bim2sim.plugins.PluginTEASER.bim2sim_teaser.task package

Submodules

bim2sim.plugins.PluginTEASER.bim2sim_teaser.task.create_result_df module

class bim2sim.plugins.PluginTEASER.bim2sim_teaser.task.create_result_df.CreateResultDF(playground)

Bases: ITask

Creates result dataframe, run() method holds detailed information.

static calc_indirect_result(bim2sim_teaser_mapping_selected)
static convert_time_index(df)

This converts the index of the result df to “days hh:mm:ss format

format_dataframe(df_original: DataFrame, bim2sim_teaser_mapping: dict, relevant_vars: list) DataFrame

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

static map_zonal_results(bim2sim_teaser_mapping_selected, elements: dict)

Add zone/space guids/names to mapping dict.

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

appropriate adjustments for aggregated zones.

reads: Tuple[str] = ('sim_results_path', 'bldg_names', 'elements')
run(sim_results_path, bldg_names, elements)

Creates a result dataframe for BEPS simulations.

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

select_wanted_results()

Selected only the wanted outputs based on sim_setting sim_results

touches: Tuple[str] = ('df_finals',)

bim2sim.plugins.PluginTEASER.bim2sim_teaser.task.create_teaser_prj module

class bim2sim.plugins.PluginTEASER.bim2sim_teaser.task.create_teaser_prj.CreateTEASER(playground)

Bases: ITask

Creates the TEASER project, run() method holds detailed information.

static min_admissible_elements(tz, bldg)
static overwrite_heatloads(exported_buildings: list)

Overwrites the original heating and cooling loads for robustness.

The original loads are saved and returned.

classmethod prepare_export(exported_buildings: list)

Export preparations for all thermal zones.

The preparation includes running the calc_building_parameter function of TEASER for all buildings. Args:

exported_buildings: list of all buildings that will be exported

reads: Tuple[str] = ('libraries', 'elements', 'weather_file')
static rotate_teaser_building(bldg: Building, true_north: float)

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

run(libraries, elements, weather_file)

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

touches: Tuple[str] = ('teaser_prj', 'bldg_names', 'orig_heat_loads', 'orig_cool_loads')

bim2sim.plugins.PluginTEASER.bim2sim_teaser.task.export_teaser module

class bim2sim.plugins.PluginTEASER.bim2sim_teaser.task.export_teaser.ExportTEASER(playground)

Bases: ITask

Export TEASER prj, run() method holds detailed information.

reads: Tuple[str] = ('teaser_prj',)
run(teaser_prj)

Exports the current TEASER project to Modelica.

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.

Args:

teaser_prj: teaser project instance

bim2sim.plugins.PluginTEASER.bim2sim_teaser.task.load_modelica_results module

class bim2sim.plugins.PluginTEASER.bim2sim_teaser.task.load_modelica_results.LoadModelicaResults(playground)

Bases: ITask

Load existing results, run() method holds detailed information.

run()

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

touches: Tuple[str] = ('bldg_names', 'sim_results_path')

bim2sim.plugins.PluginTEASER.bim2sim_teaser.task.serialize_teaser_prj module

class bim2sim.plugins.PluginTEASER.bim2sim_teaser.task.serialize_teaser_prj.SerializeTEASER(playground)

Bases: ITask

Creates the TEASER project, run() method holds detailed information.

reads: Tuple[str] = ('teaser_prj',)
run(teaser_prj)

Serialize the created TEASER project.

This is useful if we want to work on the created TEASER project outside of bim2sim and don’t want to export it directly to Modelica.

Args:

teaser_prj: teaser project instance

bim2sim.plugins.PluginTEASER.bim2sim_teaser.task.simulate_dymola_ebcpy module

class bim2sim.plugins.PluginTEASER.bim2sim_teaser.task.simulate_dymola_ebcpy.SimulateModelEBCPy(playground)

Bases: ITask

Simulate TEASER model, run() method holds detailed information.

final = True
reads: Tuple[str] = ('bldg_names',)
run(bldg_names)

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

the subdirectory with the model name

touches: Tuple[str] = ('sim_results_path',)