bim2sim.plugins.PluginComfort.bim2sim_comfort.task package
Submodules
bim2sim.plugins.PluginComfort.bim2sim_comfort.task.create_result_df module
- class bim2sim.plugins.PluginComfort.bim2sim_comfort.task.create_result_df.CreateResultDF(playground)
Bases:
CreateResultDF
This ITask creates a result dataframe for EnergyPlus Comfort BEPS.
- Args:
idf: eppy idf
- Returns:
df_final: final dataframe that holds only relevant data, with generic bim2sim names and index in form of MM/DD-hh:mm:ss
- format_dataframe(df_original: DataFrame, zone_dict: dict) DataFrame
Formats the dataframe to generic bim2sim output structure.
- This function:
adds the space GUIDs to the results
selects only the selected simulation outputs from the result
- Args:
df_original: original dataframe directly taken from simulation zone_dict: dictionary with all zones, in format {GUID : Zone Usage}
- Returns:
df_final: converted dataframe in bim2sim result structure
- reads: Tuple[str] = ('idf', 'sim_results_path', 'df_finals')
- run(idf, sim_results_path, df_finals)
Create a result DataFrame for EnergyPlus BEPS results.
This function transforms the EnergyPlus simulation results to the general result data format used in this bim2sim project. The simulation results stored in the EnergyPlus result file ( “eplusout.csv”) are shifted by one hour to match the simulation results of the modelica simulation. Afterwards, the simulation results are formatted to match the bim2sim dataframe format.
- Args:
idf (IDF): eppy idf sim_results_path (Path): path to the simulation results from
EnergyPlus
- elements (dict): dictionary in the format dict[guid: element],
holds preprocessed elements including space boundaries.
- Returns:
df_finals (dict): dictionary in the format dict[str(project name): pd.DataFrame], final dataframe that holds only relevant data, with generic bim2sim names and index in form of MM/DD-hh:mm:ss
- touches: Tuple[str] = ('df_finals',)
bim2sim.plugins.PluginComfort.bim2sim_comfort.task.ep_comfort_settings module
Export EnergyPlus Comfort Settings.
This module includes all functions for exporting Comfort Settings as EnergyPlus Input files (idf). Geometric preprocessing (includes EnergyPlus specific space boundary enrichment) and EnergyPlus Input File export must be executed before this module.
- class bim2sim.plugins.PluginComfort.bim2sim_comfort.task.ep_comfort_settings.ComfortSettings(playground)
Bases:
ITask
Create Comfort Settings for an EnergyPlus Input file.
Task to create Comfort Settings for an EnergyPlus Input file.
- add_comfort_to_people_enrichment(idf: IDF, elements, use_dynamic_clothing=False)
Add comfort parameters to people objects in CreateIdf.
This method adds comfort parameters to people objects to the input eppy idf. Args:
idf: eppy idf elements: bim2sim elements use_dynamic_clothing: True if dynamic clothing (ASHRAE 55)
should be activated
- add_comfort_to_people_manual(idf: IDF, elements, use_dynamic_clothing=False)
Manually add comfort parameters to people objects in CreateIdf.
This method manually adds comfort parameters to people objects to the input eppy idf. Args:
idf: eppy idf elements: bim2sim elements use_dynamic_clothing: True if dynamic clothing (ASHRAE 55)
should be activated
- static add_comfort_variables(idf: IDF)
Add output variables for comfort measures to the input IDF file.
- Args:
idf: eppy idf
- static define_comfort_usage_dict()
Define a new set of comfort parameters per use condition.
This method defines hardcoded schedules for clothing, air velocity and work efficiency. Check values for applicability of these parameters. The resulting json file is written to bim2sim_comfort/assets/comfort_usage.json.
- reads: Tuple[str] = ('elements', 'idf', 'sim_results_path')
- static remove_duplicate_names(idf: IDF)
Test for duplicate idfobject names and remove objects.
EnergyPlus requires unique naming for IdfObjects, otherwise, the simulation crashes. To increase the robustness of the implementation, the idf is tested for duplicate names and duplicate objects are removed. This decreases the accuracy of the model, so the logging should be evaluated carefully for duplicate objects. With a suitable IFC input model quality, no duplicate names should be found.
- Args:
idf: eppy idf
- static remove_empty_zones(idf: IDF)
Remove empty zones and zonegroups from idf.
Depending on the quality of the input ifc and their space boundaries, empty thermal zones may be created (or be left after corrections) in the resulting idf. This raises errors in thermal comfort simulation. This method evaluates if a thermal zone has surfaces in idf, and removes the zone from zonelists and zonegroups.
- Args:
idf: eppy idf
- run(elements: dict, idf: IDF, sim_results_path: Path)
Execute all methods to export comfort parameters to idf.
Execute all methods to export comfort parameters to idf. Args:
elements: bim2sim elements idf: eppy idf sim_results_path (Path): path to simulation results.
- static set_day_week_year_limit_schedule(idf: IDF, schedule: list[float], schedule_name: str, limits_name: str = 'Any Number')
Set day, week and year schedule (hourly).
This function sets an hourly day, week and year schedule.
- Args:
idf: idf file object schedule: list of float values for the schedule (e.g.,
temperatures, loads)
schedule_name: str limits_name: str, defaults set to ‘Any Number’
- touches: Tuple[str] = ('idf',)
bim2sim.plugins.PluginComfort.bim2sim_comfort.task.ep_comfort_visualization module
Visualize EnergyPlus Comfort Results.
This module includes all functions for visualization of Comfort Results. Geometric preprocessing (includes EnergyPlus specific space boundary enrichment), EnergyPlus Input File export and EnergyPlus simulation must be executed before this module.
- class bim2sim.plugins.PluginComfort.bim2sim_comfort.task.ep_comfort_visualization.ComfortVisualization(playground)
Bases:
ITask
Visualize Comfort Results of an EnergyPlus Simulation.
Task to Visualize EnergyPlus Comfort Measures.
- reads: Tuple[str] = ('elements',)
- run(elements=None)
Execute all methods to visualize comfort results.
- static visualize_calendar(df, year='', color_only=False, save_as='', construction='', skip_legend=False, add_title=False)
- static visualize_comfort(spaces, mean_temp_df)
bim2sim.plugins.PluginComfort.bim2sim_comfort.task.ep_load_idf module
- class bim2sim.plugins.PluginComfort.bim2sim_comfort.task.ep_load_idf.LoadIdf(playground)
Bases:
ITask
Load the IDF file of an EnergyPlus Simulation.
Task to Load an IDF file from a previous BIM2SIM execution from project directory.
- run(workflow)
Execute all methods to load an existing IDF file.
- touches: Tuple[str] = ('idf',)
bim2sim.plugins.PluginComfort.bim2sim_comfort.task.plot_comfort_results module
- class bim2sim.plugins.PluginComfort.bim2sim_comfort.task.plot_comfort_results.PlotComfortResults(playground)
Bases:
PlotBEPSResults
- apply_en16798_to_all_zones(df, zone_dict, export_path)
Generate EN 16798 diagrams for all thermal zones.
- apply_en16798_to_single_zone(df, zone_dict, export_path, zone_guid)
- final = True
- static plot_new_en16798_adaptive_count(df, guid, room_name, export_path)
Plot EN 16798 diagram for thermal comfort categories for a single thermal zone.
- static pmv_plot(df, save_path, file_name)
- reads: Tuple[str] = ('df_finals', 'sim_results_path', 'ifc_files')
- static rename_duplicates(dictionary)
- rename_zone_usage(zone_dict, rename_keys)
- run(df_finals, sim_results_path, ifc_files)
Plots the results for BEPS simulations.
This holds pre configured functions to plot the results of the BEPS simulations with the EnergyPlus-based PluginComfort .
- Args:
- df_finals: dict of final results where key is the building name and
value is the dataframe holding the results for this building
sim_results_path: base path where to store the plots ifc_files: bim2sim IfcFileClass holding the ifcopenshell ifc instance
- static table_bar_plot_16798(df, export_path)
Create bar plot with a table below for EN 16798 thermal comfort.
This function creates a bar plot with a table below along with the thermal comfort categories according to EN 16798. This table considers all hours of the day, not only the occupancy hours.
- static visualize_calendar(calendar_df, export_path, year='', color_only=False, save=True, save_as='', construction='', skip_legend=False, add_title=False, figsize=[7.6, 8], zone_dict=None)