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
Dummy
Element
Element.calc_orientation()
Element.calc_position()
Element.full_reset()
Element.get_id()
Element.get_object()
Element.get_pending_attribute_decisions()
Element.guid_prefix
Element.orientation
Element.position
Element.request()
Element.source_info()
Element.validate_attributes()
Element.validate_creation()
ElementEncoder
ElementError
Factory
IFCBased
IFCBased.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_type
IFCBased.ifc_types
IFCBased.inverse_properties()
IFCBased.name
IFCBased.pattern_ifc_type
IFCBased.pre_validate()
IFCBased.search_property_hierarchy()
IFCBased.select_from_potential_properties()
IFCBased.source_info()
IFCBased.summary()
Material
NoValueError
Port
ProductBased
ProductBased.calc_cost_group()
ProductBased.calc_volume_from_ifc_shape()
ProductBased.conditions
ProductBased.cost_group
ProductBased.domain
ProductBased.get_better_subclass()
ProductBased.get_ports()
ProductBased.key
ProductBased.key_map
ProductBased.neighbors
ProductBased.validate_attributes()
ProductBased.validate_creation()
ProductBased.validate_ports()
RelationBased
SerializedElement
- bim2sim.elements.bps_elements module
BPSProduct
BPSProduct.calc_cost_group()
BPSProduct.calc_orientation()
BPSProduct.domain
BPSProduct.get_bound_area()
BPSProduct.get_net_bound_area()
BPSProduct.gross_area
BPSProduct.group_orientation()
BPSProduct.is_external
BPSProduct.key
BPSProduct.net_area
BPSProduct.opening_area
BPSProduct.sbs_without_corresponding
BPSProduct.volume
BPSProductWithLayers
Building
Building.ahu_cooling
Building.ahu_dehumidification
Building.ahu_heat_recovery
Building.ahu_heat_recovery_efficiency
Building.ahu_heating
Building.ahu_humidification
Building.avg_storey_height
Building.bldg_name
Building.conditions
Building.from_ifc_domains
Building.gross_area
Building.ifc_types
Building.key
Building.net_area
Building.number_of_storeys
Building.occupancy_type
Building.with_ahu
Building.year_of_construction
Door
ExtSpatialSpaceBoundary
ExternalSpatialElement
GroundFloor
InnerDoor
InnerFloor
InnerWall
Layer
LayerSet
OuterDoor
OuterWall
Roof
Site
Slab
SpaceBoundary
SpaceBoundary.bound_area
SpaceBoundary.bound_center
SpaceBoundary.bound_neighbors
SpaceBoundary.bound_normal
SpaceBoundary.bound_shape
SpaceBoundary.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_types
SpaceBoundary.internal_external_type
SpaceBoundary.is_external
SpaceBoundary.level_description
SpaceBoundary.move_bound_in_direction_of_normal()
SpaceBoundary.net_bound_area
SpaceBoundary.opening_area
SpaceBoundary.opening_bounds
SpaceBoundary.parent_bound
SpaceBoundary.physical
SpaceBoundary.pre_validate()
SpaceBoundary.related_adb_bound
SpaceBoundary.related_bound
SpaceBoundary.storeys
SpaceBoundary.top_bottom
SpaceBoundary.validate_creation()
SpaceBoundary2B
SpaceBoundaryRepresentation
Storey
ThermalZone
ThermalZone.AreaPerOccupant
ThermalZone.T_threshold_cooling
ThermalZone.T_threshold_heating
ThermalZone.activity_degree_persons
ThermalZone.central_ahu
ThermalZone.clothing_persons
ThermalZone.cooling_profile
ThermalZone.external_orientation
ThermalZone.fixed_heat_flow_rate_persons
ThermalZone.footprint_shape
ThermalZone.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_percentage
ThermalZone.gross_area
ThermalZone.gross_volume
ThermalZone.heating_profile
ThermalZone.height
ThermalZone.horizontal_sbs
ThermalZone.ifc_types
ThermalZone.infiltration_rate
ThermalZone.internal_gains_moisture_no_people
ThermalZone.is_external
ThermalZone.key
ThermalZone.length
ThermalZone.lighting_power
ThermalZone.lighting_profile
ThermalZone.machines
ThermalZone.machines_profile
ThermalZone.max_ahu
ThermalZone.max_humidity
ThermalZone.max_overheating_infiltration
ThermalZone.max_summer_infiltration
ThermalZone.max_user_infiltration
ThermalZone.mechanical_ventilation_rate
ThermalZone.min_ahu
ThermalZone.min_humidity
ThermalZone.name
ThermalZone.natural_ventilation
ThermalZone.natural_ventilation_rate
ThermalZone.net_area
ThermalZone.net_ceiling_area
ThermalZone.net_volume
ThermalZone.net_wall_area
ThermalZone.outer_walls
ThermalZone.pattern_ifc_type
ThermalZone.persons
ThermalZone.persons_profile
ThermalZone.ratio_conv_rad_lighting
ThermalZone.ratio_conv_rad_machines
ThermalZone.ratio_conv_rad_persons
ThermalZone.space_center
ThermalZone.space_neighbors
ThermalZone.space_shape
ThermalZone.space_shape_volume
ThermalZone.surround_clo_persons
ThermalZone.t_ground
ThermalZone.t_set_cool
ThermalZone.t_set_heat
ThermalZone.typical_length
ThermalZone.typical_width
ThermalZone.usage
ThermalZone.use_constant_infiltration
ThermalZone.width
ThermalZone.windows
ThermalZone.winter_reduction_infiltration
ThermalZone.with_ahu
ThermalZone.with_cooling
ThermalZone.with_heating
ThermalZone.with_ideal_thresholds
ThermalZone.zone_name
Wall
Window
Window.a_conv
Window.calc_cost_group()
Window.g_value
Window.get_glazing_area()
Window.glazing_ratio
Window.gross_area
Window.ifc_types
Window.inner_convection
Window.inner_radiation
Window.key
Window.net_area
Window.outer_convection
Window.outer_radiation
Window.pattern_ifc_type
Window.shading_g_total
Window.shading_max_irr
Window.u_value
Window.width
cls
- bim2sim.elements.hvac_elements module
AirTerminal
Boiler
Boiler.dT_water
Boiler.dry_mass
Boiler.efficiency
Boiler.energy_source
Boiler.expected_hvac_ports
Boiler.flow_temperature
Boiler.get_inner_connections()
Boiler.ifc_types
Boiler.is_generator()
Boiler.key
Boiler.min_PLR
Boiler.min_power
Boiler.nominal_efficiency
Boiler.nominal_partial_ratio
Boiler.nominal_power_consumption
Boiler.operating_mode
Boiler.partial_load_efficiency
Boiler.pattern_ifc_type
Boiler.rated_power
Boiler.return_temperature
Boiler.water_volume
CHP
Chiller
Chiller.COP
Chiller.capacity_curve
Chiller.expected_hvac_ports
Chiller.full_load_ratio
Chiller.ifc_types
Chiller.key
Chiller.min_power
Chiller.nominal_COP
Chiller.nominal_condensing_temperature
Chiller.nominal_evaporating_temperature
Chiller.nominal_power_consumption
Chiller.pattern_ifc_type
Chiller.rated_power
CoolingTower
Distributor
Duct
DuctFitting
ExpansionTank
HVACPort
HVACProduct
HeatExchanger
HeatPump
Junction
Medium
Pipe
PipeFitting
Pump
SpaceHeater
SpaceHeater.body_mass
SpaceHeater.dT_water
SpaceHeater.expected_hvac_ports
SpaceHeater.flow_temperature
SpaceHeater.heat_capacity
SpaceHeater.height
SpaceHeater.ifc_types
SpaceHeater.is_consumer()
SpaceHeater.key
SpaceHeater.length
SpaceHeater.medium
SpaceHeater.number_of_panels
SpaceHeater.number_of_sections
SpaceHeater.pattern_ifc_type
SpaceHeater.rated_power
SpaceHeater.return_temperature
SpaceHeater.temperature_classification
SpaceHeater.thermal_efficiency
Storage
ThreeWayValve
Valve
cls
diameter_post_processing()
length_post_processing()
- bim2sim.examples package
- bim2sim.export package
- bim2sim.kernel package
IFCDomainError
- Subpackages
- bim2sim.kernel.decision package
BoolDecision
Decision
DecisionBunch
DecisionCancel
DecisionException
DecisionSkip
DecisionSkipAll
GuidDecision
ListDecision
PendingDecisionError
RealDecision
Status
StringDecision
convert()
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
Plugin
PluginBPSBase
add_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
PyOCCTools
PyOCCTools.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
AttributeDataSource
AttributeDataSource.decision
AttributeDataSource.default
AttributeDataSource.default_association
AttributeDataSource.default_ps
AttributeDataSource.enrichment
AttributeDataSource.finder
AttributeDataSource.function
AttributeDataSource.ifc_attr
AttributeDataSource.manual_overwrite
AttributeDataSource.patterns
AttributeDataSource.space_boundary
IFCDomain
LOD
ZoningCriteria
- bim2sim.utilities.visualize_spaces module
Submodules
bim2sim.project module
Project handling
- class bim2sim.project.FolderStructure(path=None)
Bases:
object
Project 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:
object
Project 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:
type
Adds 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:
object
Specification 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:
object
Define 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:
dict
Manages 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.