bim2sim package
bim2sim library
- bim2sim.run_project(project: Project, handler: DecisionHandler)
Run project using decision handler.
Subpackages
- bim2sim.elements package
- Subpackages
- Submodules
- bim2sim.elements.base_elements module
DummyElementElement.calc_orientation()Element.calc_position()Element.full_reset()Element.get_id()Element.get_object()Element.get_pending_attribute_decisions()Element.guid_prefixElement.orientationElement.positionElement.request()Element.source_info()Element.validate_attributes()Element.validate_creation()
ElementEncoderElementErrorFactoryIFCBasedIFCBased.calc_orientation()IFCBased.calc_position()IFCBased.filter_for_text_fragments()IFCBased.filter_properties()IFCBased.from_ifc()IFCBased.get_building()IFCBased.get_exact_property()IFCBased.get_hierarchical_children()IFCBased.get_hierarchical_parent()IFCBased.get_ifc_attribute()IFCBased.get_project()IFCBased.get_propertyset()IFCBased.get_propertysets()IFCBased.get_site()IFCBased.get_space()IFCBased.get_spartial_children()IFCBased.get_spartial_parent()IFCBased.get_storey()IFCBased.get_true_north()IFCBased.get_type_propertysets()IFCBased.ifc2args()IFCBased.ifc_typeIFCBased.ifc_typesIFCBased.inverse_properties()IFCBased.nameIFCBased.pattern_ifc_typeIFCBased.pre_validate()IFCBased.search_property_hierarchy()IFCBased.select_from_potential_properties()IFCBased.source_info()IFCBased.summary()
MaterialNoValueErrorPortProductBasedProductBased.calc_cost_group()ProductBased.calc_volume_from_ifc_shape()ProductBased.conditionsProductBased.cost_groupProductBased.domainProductBased.get_better_subclass()ProductBased.get_ports()ProductBased.keyProductBased.key_mapProductBased.neighborsProductBased.validate_attributes()ProductBased.validate_creation()ProductBased.validate_ports()
RelationBasedSerializedElement
- bim2sim.elements.bps_elements module
BPSProductBPSProduct.calc_cost_group()BPSProduct.calc_orientation()BPSProduct.domainBPSProduct.get_bound_area()BPSProduct.get_net_bound_area()BPSProduct.gross_areaBPSProduct.group_orientation()BPSProduct.is_externalBPSProduct.keyBPSProduct.net_areaBPSProduct.opening_areaBPSProduct.sbs_without_correspondingBPSProduct.volume
BPSProductWithLayersBuildingBuilding.ahu_coolingBuilding.ahu_dehumidificationBuilding.ahu_heat_recoveryBuilding.ahu_heat_recovery_efficiencyBuilding.ahu_heatingBuilding.ahu_humidificationBuilding.avg_storey_heightBuilding.bldg_nameBuilding.conditionsBuilding.from_ifc_domainsBuilding.gross_areaBuilding.ifc_typesBuilding.keyBuilding.net_areaBuilding.number_of_storeysBuilding.occupancy_typeBuilding.with_ahuBuilding.year_of_construction
DoorExtSpatialSpaceBoundaryExternalSpatialElementGroundFloorInnerDoorInnerFloorInnerWallLayerLayerSetOuterDoorOuterWallRoofSiteSlabSpaceBoundarySpaceBoundary.bound_areaSpaceBoundary.bound_centerSpaceBoundary.bound_neighborsSpaceBoundary.bound_normalSpaceBoundary.bound_shapeSpaceBoundary.calc_orientation()SpaceBoundary.calc_position()SpaceBoundary.compute_surface_normals_in_space()SpaceBoundary.get_bound_area()SpaceBoundary.get_bound_center()SpaceBoundary.get_level_description()SpaceBoundary.get_transformed_shape()SpaceBoundary.ifc_typesSpaceBoundary.internal_external_typeSpaceBoundary.is_externalSpaceBoundary.level_descriptionSpaceBoundary.move_bound_in_direction_of_normal()SpaceBoundary.net_bound_areaSpaceBoundary.opening_areaSpaceBoundary.opening_boundsSpaceBoundary.parent_boundSpaceBoundary.physicalSpaceBoundary.pre_validate()SpaceBoundary.related_adb_boundSpaceBoundary.related_boundSpaceBoundary.storeysSpaceBoundary.top_bottomSpaceBoundary.validate_creation()
SpaceBoundary2BSpaceBoundaryRepresentationStoreyThermalZoneThermalZone.AreaPerOccupantThermalZone.T_threshold_coolingThermalZone.T_threshold_heatingThermalZone.activity_degree_personsThermalZone.central_ahuThermalZone.clothing_personsThermalZone.cooling_profileThermalZone.external_orientationThermalZone.fixed_heat_flow_rate_personsThermalZone.footprint_shapeThermalZone.get__elements_by_type()ThermalZone.get_bound_floor_area()ThermalZone.get_net_bound_floor_area()ThermalZone.get_space_shape_volume()ThermalZone.get_volume_geometric()ThermalZone.glass_percentageThermalZone.gross_areaThermalZone.gross_volumeThermalZone.heating_profileThermalZone.heightThermalZone.horizontal_sbsThermalZone.ifc_typesThermalZone.infiltration_rateThermalZone.internal_gains_moisture_no_peopleThermalZone.is_externalThermalZone.keyThermalZone.lengthThermalZone.lighting_powerThermalZone.lighting_profileThermalZone.machinesThermalZone.machines_profileThermalZone.max_ahuThermalZone.max_humidityThermalZone.max_overheating_infiltrationThermalZone.max_summer_infiltrationThermalZone.max_user_infiltrationThermalZone.mechanical_ventilation_rateThermalZone.min_ahuThermalZone.min_humidityThermalZone.nameThermalZone.natural_ventilationThermalZone.natural_ventilation_rateThermalZone.net_areaThermalZone.net_ceiling_areaThermalZone.net_volumeThermalZone.net_wall_areaThermalZone.outer_wallsThermalZone.pattern_ifc_typeThermalZone.personsThermalZone.persons_profileThermalZone.ratio_conv_rad_lightingThermalZone.ratio_conv_rad_machinesThermalZone.ratio_conv_rad_personsThermalZone.space_centerThermalZone.space_neighborsThermalZone.space_shapeThermalZone.space_shape_volumeThermalZone.surround_clo_personsThermalZone.t_groundThermalZone.t_set_coolThermalZone.t_set_heatThermalZone.typical_lengthThermalZone.typical_widthThermalZone.usageThermalZone.use_constant_infiltrationThermalZone.widthThermalZone.windowsThermalZone.winter_reduction_infiltrationThermalZone.with_ahuThermalZone.with_coolingThermalZone.with_heatingThermalZone.with_ideal_thresholdsThermalZone.zone_name
WallWindowWindow.a_convWindow.calc_cost_group()Window.g_valueWindow.get_glazing_area()Window.glazing_ratioWindow.gross_areaWindow.ifc_typesWindow.inner_convectionWindow.inner_radiationWindow.keyWindow.net_areaWindow.outer_convectionWindow.outer_radiationWindow.pattern_ifc_typeWindow.shading_g_totalWindow.shading_max_irrWindow.u_valueWindow.width
cls
- bim2sim.elements.hvac_elements module
AirTerminalBoilerBoiler.dT_waterBoiler.dry_massBoiler.efficiencyBoiler.energy_sourceBoiler.expected_hvac_portsBoiler.flow_temperatureBoiler.get_inner_connections()Boiler.ifc_typesBoiler.is_generator()Boiler.keyBoiler.min_PLRBoiler.min_powerBoiler.nominal_efficiencyBoiler.nominal_partial_ratioBoiler.nominal_power_consumptionBoiler.operating_modeBoiler.partial_load_efficiencyBoiler.pattern_ifc_typeBoiler.rated_powerBoiler.return_temperatureBoiler.water_volume
CHPChillerChiller.COPChiller.capacity_curveChiller.expected_hvac_portsChiller.full_load_ratioChiller.ifc_typesChiller.keyChiller.min_powerChiller.nominal_COPChiller.nominal_condensing_temperatureChiller.nominal_evaporating_temperatureChiller.nominal_power_consumptionChiller.pattern_ifc_typeChiller.rated_power
CoolingTowerDistributorDuctDuctFittingExpansionTankHVACPortHVACProductHeatExchangerHeatPumpJunctionMediumPipePipeFittingPumpSpaceHeaterSpaceHeater.body_massSpaceHeater.dT_waterSpaceHeater.expected_hvac_portsSpaceHeater.flow_temperatureSpaceHeater.heat_capacitySpaceHeater.heightSpaceHeater.ifc_typesSpaceHeater.is_consumer()SpaceHeater.keySpaceHeater.lengthSpaceHeater.mediumSpaceHeater.number_of_panelsSpaceHeater.number_of_sectionsSpaceHeater.pattern_ifc_typeSpaceHeater.rated_powerSpaceHeater.return_temperatureSpaceHeater.temperature_classificationSpaceHeater.thermal_efficiency
StorageThreeWayValveValveclsdiameter_post_processing()length_post_processing()
- bim2sim.examples package
- bim2sim.export package
- bim2sim.kernel package
IFCDomainError- Subpackages
- bim2sim.kernel.decision package
BoolDecisionDecisionDecisionBunchDecisionCancelDecisionExceptionDecisionSkipDecisionSkipAllGuidDecisionListDecisionPendingDecisionErrorRealDecisionStatusStringDecisionconvert()convert_0_to_0_1()load()save()- Submodules
- bim2sim.kernel.decision.console module
- bim2sim.kernel.decision.decisionhandler module
- bim2sim.kernel.decision package
- Submodules
- bim2sim.kernel.decorators module
- bim2sim.kernel.ifc_file module
- bim2sim.kernel.log module
- bim2sim.plugins package
PluginPluginBPSBaseadd_plugins_to_path()available_plugins()get_plugin()load_plugin()- Subpackages
- bim2sim.tasks package
- Subpackages
- bim2sim.tasks.bps package
- Submodules
- bim2sim.tasks.bps.combine_tz module
- bim2sim.tasks.bps.disaggr_creation module
- bim2sim.tasks.bps.enrich_material module
- bim2sim.tasks.bps.enrich_use_cond module
- bim2sim.tasks.bps.plot_results module
- bim2sim.tasks.bps.sb_2b_generation module
- bim2sim.tasks.bps.sb_correction module
- bim2sim.tasks.bps.sb_creation module
- bim2sim.tasks.cfd package
- bim2sim.tasks.common package
- Submodules
- bim2sim.tasks.common.base_tasks module
- bim2sim.tasks.common.check_ifc module
- bim2sim.tasks.common.create_elements module
- bim2sim.tasks.common.create_relations module
- bim2sim.tasks.common.deserialize_elements module
- bim2sim.tasks.common.inner_loop_remover module
- bim2sim.tasks.common.load_ifc module
- bim2sim.tasks.common.serialize_elements module
- bim2sim.tasks.common.weather module
- bim2sim.tasks.hvac package
- Submodules
- bim2sim.tasks.hvac.check_ifc module
- bim2sim.tasks.hvac.connect_elements module
- bim2sim.tasks.hvac.dead_ends module
- bim2sim.tasks.hvac.expansiontanks module
- bim2sim.tasks.hvac.export module
- bim2sim.tasks.hvac.fixports module
- bim2sim.tasks.hvac.load_standardlibrary module
- bim2sim.tasks.hvac.make_graph module
- bim2sim.tasks.hvac.obsolete module
- bim2sim.tasks.hvac.reduce module
- bim2sim.tasks.bps package
- Submodules
- bim2sim.tasks.base module
- Subpackages
- bim2sim.utilities package
- Submodules
- bim2sim.utilities.check_docstrings module
- bim2sim.utilities.common_functions module
all_subclasses()angle_equivalent()combine_usages()create_plotly_graphs_from_df()download_library()filter_elements()get_common_pattern_usage()get_custom_pattern_usage()get_material_templates()get_pattern_usage()get_spaces_with_bounds()get_type_building_elements()get_type_building_elements_hvac()get_use_conditions_dict()group_by_levenshtein()remove_umlaut()rm_tree()translate_deep()validateJSON()vector_angle()wildcard_match()
- bim2sim.utilities.pyocc_tools module
PyOCCToolsPyOCCTools.check_pnt_in_solid()PyOCCTools.compare_direction_of_normals()PyOCCTools.fix_face()PyOCCTools.fix_shape()PyOCCTools.flip_orientation_of_face()PyOCCTools.get_center_of_edge()PyOCCTools.get_center_of_face()PyOCCTools.get_center_of_shape()PyOCCTools.get_center_of_volume()PyOCCTools.get_face_from_shape()PyOCCTools.get_faces_from_shape()PyOCCTools.get_footprint_of_shape()PyOCCTools.get_number_of_vertices()PyOCCTools.get_points_of_face()PyOCCTools.get_shape_area()PyOCCTools.get_shape_volume()PyOCCTools.local_placement()PyOCCTools.make_faces_from_pnts()PyOCCTools.make_shell_from_faces()PyOCCTools.make_solid_from_shape()PyOCCTools.make_solid_from_shell()PyOCCTools.move_bound_in_direction_of_normal()PyOCCTools.move_bounds_to_vertical_pos()PyOCCTools.obj2_in_obj1()PyOCCTools.remove_coincident_and_collinear_points_from_face()PyOCCTools.remove_coincident_vertices()PyOCCTools.remove_collinear_vertices2()PyOCCTools.scale_edge()PyOCCTools.scale_face()PyOCCTools.scale_shape()PyOCCTools.sew_shapes()PyOCCTools.simple_face_normal()PyOCCTools.triangulate_bound_shape()
- bim2sim.utilities.svg_utils module
- bim2sim.utilities.test module
- bim2sim.utilities.types module
AttributeDataSourceAttributeDataSource.decisionAttributeDataSource.defaultAttributeDataSource.default_associationAttributeDataSource.default_psAttributeDataSource.enrichmentAttributeDataSource.finderAttributeDataSource.functionAttributeDataSource.ifc_attrAttributeDataSource.manual_overwriteAttributeDataSource.patternsAttributeDataSource.space_boundary
IFCDomainLODZoningCriteria
- bim2sim.utilities.visualize_spaces module
Submodules
bim2sim.project module
Project handling
- class bim2sim.project.FolderStructure(path=None)
Bases:
objectProject related file and folder handling.
- CONFIG = 'config.toml'
- DECISIONS = 'decisions.json'
- EXPORT = 'export'
- FINDER = 'finder'
- IFC_BASE = 'ifc'
- LOG = 'log'
- property assets
- property b2sroot
absolute path of bim2sim root folder
- complete_project_folder()
Adds missing sub folders to given path
- property config
absolute path to config
- copy_assets(path)
copy assets to project folder
- classmethod create(rootpath: str, ifc_paths: Dict = None, target: str = None, open_conf: bool = False)
Create ProjectFolder and set it up.
Create instance, set source path, create project folder copy ifc, base config setup and open config if needed.
- Args:
rootpath: path of root folder ifc_paths: dict with key: bim2sim domain and value: path
to corresponding ifc which gets copied into project folder
target: the target simulation tool open_conf: flag to open the config file in default application
- create_project_folder()
Creates a project folder on given path
- property decisions
absolute path to decisions
- delete(confirm=True)
Delete project folder and all files in it.
- Raises:
AssertionError: if not existing on file system
- property enrichment
- property export
absolute path to export folder
- property finder
absolute path to finder
- property ifc_base
absolute path to ifc folder
- is_project_folder(path=None)
Check if root path (or given path) is a project folder
- property log
absolute path to log folder
- property root
absolute root path
- property sub_dirs
list of paths to sub folders
- class bim2sim.project.Project(path: str = None, plugin: Type[Plugin] = None)
Bases:
objectProject resource handling.
- Args:
path: path to load project from plugin: Plugin to use. This overwrites plugin from config.
- Raises:
AssertionError: on invalid path. E.g. if not existing
- property config
returns configparser instance. Basic config is done if file is not present
- classmethod create(project_folder, ifc_paths: Dict = None, plugin: str | Type[Plugin] = None, open_conf: bool = False)
Create new project
- Args:
project_folder: directory of project ifc_paths: dict with key: IFCDomain and value: path
to corresponding ifc which gets copied into project folder
- plugin: Plugin to use with this project. If passed as string,
make sure it is importable (see plugins.load_plugin)
open_conf: flag to open the config file in default application updated from config
- delete()
Delete the project.
- finalize(success=False)
cleanup method
- formatter = <bim2sim.kernel.log.CustomFormatter object>
- is_active() bool
Return True if current project is active, False otherwise.
- static is_project_folder(path: str) bool
- reset()
Reset the current project.
- rewrite_config()
- run(interactive=False, cleanup=True)
Run project.
- Args:
- interactive: if True the Task execution order is determined by
Decisions else its derived by plugin
- cleanup: execute cleanup logic. Not doing this is only relevant for
debugging
- Raises:
AssertionError: if project setup is broken or on invalid Decisions
- set_user_logging_handler(user_handler: Handler, set_formatter=True)
Set a project specific logging Handler for user loggers.
- Args:
user_handler: the handler instance to use for this project set_formatter: if True, the user_handlers formatter is set
- bim2sim.project.add_config_section(config: ConfigParser, sim_settings: BaseSimSettings, name: str) ConfigParser
Add a section to config with all attributes and default values.
- bim2sim.project.config_base_setup(path, backend=None)
Initial setup for config file
- bim2sim.project.open_config(path)
Open config for user and wait for closing before continue.
bim2sim.sim_settings module
Module for defining simulation model specific process settings. This targets both, settings to set for the later simulation and settings for the model generation process in bim2sim.
- class bim2sim.sim_settings.AutoSettingNameMeta(name, bases, namespace)
Bases:
typeAdds the name to every SimulationSetting attribute based on its instance name.
This makes the definition of an extra attribute ‘name’ obsolete, as the attributes ‘name’ is automatic defined based on the instance name.
- Example:
>>> # create new simulation settings for your awesome simulation >>> class MyAwesomeSimulationSettings(BaseSimSettings): ... def __init__(self): ... super().__init__()
>>> # create a new simulation setting, name will be taken automatic from >>> # instance name >>> make_simulation_extra_fast = Setting( ... default=True, ... choices={ ... True: 'This simulation will be incredible fast.', ... False: 'This simulation will be increbdile slow.' ... }, ... description='Run the simulation in extra fast mode?', ... for_frontend=True ... )
>>> # create a SimulationSettings instance and get the value >>> my_awesome_settings = MyAwesomeSimulationSettings() >>> # get initial value which is always none >>> print(my_awesome_settings.make_simulation_extra_fast) None >>> # set default values and get the value >>> my_awesome_settings.load_default_settings() >>> print(my_awesome_settings.make_simulation_extra_fast) True
- class bim2sim.sim_settings.BaseSimSettings(filters: list = None)
Bases:
objectSpecification of basic bim2sim simulation settings which are common for all simulations
- add_space_boundaries
- check_mandatory()
Check if mandatory settings have a value.
- close_space_boundary_gaps
- correct_space_boundaries
- create_external_elements
- dymola_simulation
- fuzzy_threshold
- group_unidentified
- load_default_settings()
loads default values for all settings
- max_wall_thickness
- reset_guids
- update_from_config(config)
Updates the simulation settings specification from the config file
- weather_file_path
- class bim2sim.sim_settings.BooleanSetting(default=None, description: str | None = None, for_frontend: bool = False, any_string: bool = False, mandatory=False)
Bases:
Setting- check_value(bound_simulation_settings, value)
Checks the value that should be set for correctness
- Args:
bound_simulation_settings: the sim setting belonging to the value value: value that should be checked for correctness
- Returns:
True: if check was successful
- Raises:
ValueError: if check was not successful
- class bim2sim.sim_settings.BuildingSimSettings
Bases:
BaseSimSettings- add_shadings
- add_space_boundaries
- ahu_cooling
- ahu_dehumidification
- ahu_heat_recovery
- ahu_heat_recovery_efficiency
- ahu_heating
- ahu_humidification
- close_space_boundary_gaps
- construction_class_walls
- construction_class_windows
- cooling
- correct_space_boundaries
- create_plots
- deactivate_ahu
- fix_type_mismatches_with_sb
- heating
- layers_and_materials
- overwrite_ahu_by_settings
- plot_singe_zone_guid
- prj_custom_usages
- prj_use_conditions
- run_period_end_day
- run_period_end_month
- run_period_start_day
- run_period_start_month
- set_run_period
- setpoints_from_template
- sim_results
- split_bounds
- split_shadings
- year_of_construction_overwrite
- class bim2sim.sim_settings.ChoiceSetting(default=None, description: str | None = None, for_frontend: bool = False, any_string: bool = False, choices: dict = None, multiple_choice: bool = False)
Bases:
Setting- check_setting_config()
make sure str choices don’t hold ‘.’ as this is seperator for enums.
- check_value(bound_simulation_settings, value)
Checks the value that should be set for correctness
Checks if the selected value is in choices. Args:
bound_simulation_settings: the sim setting belonging to the value value: value that should be checked for correctness
- Returns:
True: if check was successful
- Raises:
ValueError: if check was not successful
- class bim2sim.sim_settings.NumberSetting(default=None, description: str | None = None, for_frontend: bool = False, any_string: bool = False, min_value: float = None, max_value: float = None)
Bases:
Setting- check_setting_config()
Make sure min and max values are reasonable
- check_value(bound_simulation_settings, value)
Checks the value that should be set for correctness
Checks if value is in limits. Args:
bound_simulation_settings: the sim setting belonging to the value value: value that should be checked for correctness
- Returns:
True: if check was successful
- Raises:
ValueError: if check was not successful
- class bim2sim.sim_settings.PathSetting(default=None, description: str | None = None, for_frontend: bool = False, any_string: bool = False, mandatory=False)
Bases:
Setting- check_value(bound_simulation_settings, value)
Checks the value that should be set for correctness
Checks if the value is a valid path Args:
bound_simulation_settings: the sim setting belonging to the value value: value that should be checked for correctness
- Returns:
True: if check was successful
- Raises:
ValueError: if check was not successful
- class bim2sim.sim_settings.PlantSimSettings
Bases:
BaseSimSettings- aggregations
- tolerance_connect_by_position
- class bim2sim.sim_settings.Setting(default=None, description: str | None = None, for_frontend: bool = False, any_string: bool = False, mandatory=False)
Bases:
objectDefine specific settings regarding model creation and simulation.
- Args:
default: default value that will be applied when calling load_default() choices: dict of possible choice for this setting as key and a description per choice as value description: description of what the settings does as Str for_frontend: should this setting be shown in the frontend multiple_choice: allows multiple choice any_string: any string is allowed instead of a given choice mandatory: whether a setting needs to be set
- check_setting_config()
Checks if the setting is configured correctly
- check_value(bound_simulation_settings, value)
Checks the value that should be set for correctness
- Args:
bound_simulation_settings: the sim setting belonging to the value value: value that should be checked for correctness
- Returns:
True: if check was successful
- Raises:
ValueError: if check was not successful
- initialize(manager)
Link between manager stored setting and direct setting of simulation
- load_default()
- class bim2sim.sim_settings.SettingsManager(bound_simulation_settings)
Bases:
dictManages the different settings of a SimulationSettings instance.
The manager is needed to maintain the different attributes of a simulation (e.g. choices) while making the read and write access to the setting still easy. This way you can call sim_settings.<setting_name> and get the value directly while under sim_settings.manager.<setting_name> you can still find all information.
- Args:
bound_simulation_settings: instance of sim_settings this manager is bound to. E.g. BuildingSimSettings.
- property names
Returns a generator object with all settings that the bound_simulation_settings owns.