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
DummyElementElementEncoderElementErrorFactoryIFCBasedIFCBased.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_product_shape()ProductBased.calc_volume_from_ifc_shape()ProductBased.conditionsProductBased.domainProductBased.get_better_subclass()ProductBased.get_ports()ProductBased.keyProductBased.key_mapProductBased.neighborsProductBased.validate_attributes()ProductBased.validate_creation()ProductBased.validate_ports()ProductBased.volume
RelationBasedSerializedElement
- bim2sim.elements.bps_elements module
BPSProductBPSProduct.calc_cost_group()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.teaser_orientation
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_normalSpaceBoundary.bound_shapeSpaceBoundary.get_bound_area()SpaceBoundary.get_level_description()SpaceBoundary.ifc_typesSpaceBoundary.internal_external_typeSpaceBoundary.is_externalSpaceBoundary.level_descriptionSpaceBoundary.net_bound_areaSpaceBoundary.opening_areaSpaceBoundary.physicalSpaceBoundary.pre_validate()SpaceBoundary.related_adb_boundSpaceBoundary.related_boundSpaceBoundary.top_bottomSpaceBoundary.validate_creation()
SpaceBoundary2BStoreyThermalZoneThermalZone.T_threshold_coolingThermalZone.T_threshold_heatingThermalZone.activity_degree_personsThermalZone.area_per_occupantThermalZone.base_infiltrationThermalZone.central_ahuThermalZone.clothing_personsThermalZone.cooling_profileThermalZone.external_orientationThermalZone.fixed_heat_flow_rate_personsThermalZone.fixed_lighting_powerThermalZone.footprint_shapeThermalZone.get__elements_by_type()ThermalZone.get_bound_floor_area()ThermalZone.get_net_bound_floor_area()ThermalZone.glass_percentageThermalZone.gross_areaThermalZone.gross_volumeThermalZone.heating_profileThermalZone.heightThermalZone.horizontal_sbsThermalZone.ifc_typesThermalZone.internal_gains_moisture_no_peopleThermalZone.is_externalThermalZone.keyThermalZone.lengthThermalZone.lighting_efficiency_lumenThermalZone.lighting_powerThermalZone.lighting_profileThermalZone.machinesThermalZone.machines_profileThermalZone.maintained_illuminanceThermalZone.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.usageThermalZone.use_constant_infiltrationThermalZone.use_maintained_illuminanceThermalZone.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.minimal_part_load_ratioBoiler.nominal_efficiencyBoiler.nominal_power_consumptionBoiler.operating_modeBoiler.part_load_ratio_rangeBoiler.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
CoolingTowerDistributorDuctDuctFittingExpansionTankHVACPortHVACProductHVACProduct.calc_cost_group()HVACProduct.decide_inner_connections()HVACProduct.domainHVACProduct.expected_hvac_portsHVACProduct.get_inner_connections()HVACProduct.get_ports()HVACProduct.is_consumer()HVACProduct.is_generator()HVACProduct.keyHVACProduct.shapeHVACProduct.validate_ports()HVACProduct.volume
HeatExchangerHeatPumpJunctionMediumPipePipeFittingPumpSpaceHeaterSpaceHeater.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.plugins.PluginAixLib package
- bim2sim.plugins.PluginComfort package
- bim2sim.plugins.PluginEnergyPlus package
- bim2sim.plugins.PluginHKESim package
- bim2sim.plugins.PluginLCA package
- bim2sim.plugins.PluginOpenFOAM package
- bim2sim.plugins.PluginTEASER package
- bim2sim.plugins.PluginTemplate package
- 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.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_use_conditions_dict()group_by_levenshtein()remove_umlaut()rm_tree()translate_deep()validateJSON()vector_angle()wildcard_match()
- bim2sim.utilities.pyocc_tools module
PyOCCToolsPyOCCTools.calculate_point_based_distance()PyOCCTools.check_pnt_in_solid()PyOCCTools.compare_direction_of_normals()PyOCCTools.create_offset_shape()PyOCCTools.enlarge_bounding_box_shape_in_dir()PyOCCTools.extrude_face_in_direction()PyOCCTools.find_min_distance_along_direction()PyOCCTools.fix_face()PyOCCTools.fix_shape()PyOCCTools.flip_orientation_of_face()PyOCCTools.fuse_shapes()PyOCCTools.generate_obj_trsfs()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_minimal_bounding_box()PyOCCTools.get_number_of_faces()PyOCCTools.get_number_of_vertices()PyOCCTools.get_points_of_face()PyOCCTools.get_points_of_minimum_point_shape_distance()PyOCCTools.get_points_of_minimum_shape_distance()PyOCCTools.get_projection_of_bounding_box()PyOCCTools.get_shape_area()PyOCCTools.get_shape_volume()PyOCCTools.get_unique_vertices()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.remove_sides_of_bounding_box()PyOCCTools.rotate_by_deg()PyOCCTools.sample_points_on_faces()PyOCCTools.scale_edge()PyOCCTools.scale_face()PyOCCTools.scale_shape()PyOCCTools.scale_shape_absolute()PyOCCTools.sew_shapes()PyOCCTools.simple_bounding_box()PyOCCTools.simple_bounding_box_shape()PyOCCTools.simple_face_normal()PyOCCTools.sweep_line_find_intersections_multiple_shapes()PyOCCTools.transform_set_to_origin_based_on_surface()PyOCCTools.triangulate_bound_shape()PyOCCTools.unify_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
BoundaryOrientationIFCDomainLODZoningCriteria
- 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, plugin: str | Type[Plugin] = 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
plugin: the target Plugin 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
- 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
- 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:
typeSets the name to every SimulationSetting attribute based on its instance name.
- class bim2sim.sim_settings.BaseSimSettings(filters: list = None)
Bases:
objectSpecification of basic bim2sim simulation settings which are common for all simulations
- add_space_boundaries
- building_rotation_overwrite
- 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
- group_unidentified_
- load_default_settings()
loads default values for all settings
- max_wall_thickness
- reset_guids
- stories_to_load_guids
- update_from_config(config)
Updates the simulation settings specification from the config file
- weather_file_path
- class bim2sim.sim_settings.BooleanSetting(*, name: str = 'set automatically', description: str | None = None, for_frontend: bool = False, any_string: bool = False, mandatory: bool = False, value: bool | None)
Bases:
Setting- model_config: ClassVar[ConfigDict] = {'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- value: bool | None
- class bim2sim.sim_settings.BuildingSimSettings
Bases:
BaseSimSettings- add_shadings
- add_space_boundaries
- ahu_cooling_overwrite
- ahu_dehumidification_overwrite
- ahu_heat_recovery_efficiency_overwrite
- ahu_heat_recovery_overwrite
- ahu_heating_overwrite
- ahu_humidification_overwrite
- ahu_tz_overwrite
- base_infiltration_rate_overwrite
- close_space_boundary_gaps
- construction_class_doors
- construction_class_walls
- construction_class_windows
- cooling_tz_overwrite
- correct_space_boundaries
- create_plots
- heating_tz_overwrite
- layers_and_materials
- 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
- use_constant_infiltration_overwrite
- use_maintained_illuminance
- year_of_construction_overwrite
- class bim2sim.sim_settings.ChoiceSetting(*, name: str = 'set automatically', description: str | None = None, for_frontend: bool = False, any_string: bool = False, mandatory: bool = False, value: str | List[str] | Enum | None, choices: dict, multiple_choice: bool = False)
Bases:
Setting- check_content()
- classmethod check_setting_config(choices)
- choices: dict
- model_config: ClassVar[ConfigDict] = {'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- multiple_choice: bool
- value: str | List[str] | Enum | None
- class bim2sim.sim_settings.GuidListSetting(*, name: str = 'set automatically', description: str | None = None, for_frontend: bool = False, any_string: bool = False, mandatory: bool = False, value: List[str] | None = None)
Bases:
Setting- classmethod check_value(value)
- model_config: ClassVar[ConfigDict] = {'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- value: List[str] | None
- class bim2sim.sim_settings.NumberSetting(*, name: str = 'set automatically', description: str | None = None, for_frontend: bool = False, any_string: bool = False, mandatory: bool = False, value: float | int | None, min_value: float | int | None = None, max_value: float | int | None = None)
Bases:
Setting- check_limits() Self
- check_setting_config() Self
- max_value: float | int | None
- min_value: float | int | None
- model_config: ClassVar[ConfigDict] = {'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- value: float | int | None
- class bim2sim.sim_settings.PathSetting(*, name: str = 'set automatically', description: str | None = None, for_frontend: bool = False, any_string: bool = False, mandatory: bool = False, value: Path | Path | None)
Bases:
Setting- model_config: ClassVar[ConfigDict] = {'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- value: Path | Path | None
- class bim2sim.sim_settings.PlantSimSettings
Bases:
BaseSimSettings- aggregations
- tolerance_connect_by_position
- verify_connection_by_position
- class bim2sim.sim_settings.Setting(*, name: str = 'set automatically', description: str | None = None, for_frontend: bool = False, any_string: bool = False, mandatory: bool = False)
Bases:
BaseModelBase class for all simulation settings.
The attribute “value”, which contains the payload of the simulation setting, is added in the derived classes for the different data types (e.g. NumberSetting(Setting)).
The value, which is assigned to the attribute “value”, when instancing the setting, serves as a default value and can be changed according to the use case, if necessary.
- Args:
name: Name of the setting. Is set automatically by AutoSettingNameMeta(type) description: description the setting for_frontend: should this setting be shown in the frontend any_string: any string is allowed instead of a given choice mandatory: whether a setting needs to be set
- any_string: bool
- description: str | None
- for_frontend: bool
- mandatory: bool
- model_config: ClassVar[ConfigDict] = {'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str
- 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.
- defaults = {}
- property names
Returns a generator object with all settings that the bound_simulation_settings owns.