Coverage for bim2sim/plugins/PluginAixLib/bim2sim_aixlib/examples/e1_simple_project_hvac_aixlib.py: 0%
15 statements
« prev ^ index » next coverage.py v7.6.12, created at 2025-03-12 17:09 +0000
« prev ^ index » next coverage.py v7.6.12, created at 2025-03-12 17:09 +0000
1import tempfile
2from pathlib import Path
4import bim2sim
5from bim2sim import Project, run_project, ConsoleDecisionHandler
6from bim2sim.utilities.types import IFCDomain
9def run_example_simple_hvac_aixlib():
10 """Run an HVAC simulation with the AixLib backend.
12 This example runs an HVAC with the aixlib backend. Specifies project
13 directory and location of the HVAC IFC file. Then, it creates a bim2sim
14 project with the aixlib backend. Simulation settings are specified (here,
15 the aggregations are specified), before the project is executed with the
16 previously specified settings."""
18 # Create a temp directory for the project, feel free to use a "normal"
19 # directory
20 project_path = Path(
21 tempfile.TemporaryDirectory(
22 prefix='bim2sim_example_simple_aixlib').name)
25 # Set path of ifc for hydraulic domain with the fresh downloaded test models
26 ifc_paths = {
27 IFCDomain.hydraulic:
28 Path(bim2sim.__file__).parent.parent /
29 'test/resources/hydraulic/ifc/'
30 'hvac_heating.ifc'
31 }
32 # Create a project including the folder structure for the project with
33 # teaser as backend and no specified workflow (default workflow is taken)
34 project = Project.create(project_path, ifc_paths, 'aixlib')
36 # set weather file data
37 project.sim_settings.weather_file_path = (
38 Path(bim2sim.__file__).parent.parent /
39 'test/resources/weather_files/DEU_NW_Aachen.105010_TMYx.mos')
41 # specify simulation settings
42 project.sim_settings.aggregations = [
43 'UnderfloorHeating',
44 'Consumer',
45 'PipeStrand',
46 'ParallelPump',
47 'ConsumerHeatingDistributorModule',
48 'GeneratorOneFluid'
49 ]
50 project.sim_settings.group_unidentified = 'name'
52 # Run the project with the ConsoleDecisionHandler. This allows interactive
53 # input to answer upcoming questions regarding the imported IFC.
54 # Correct decision for identification of elements and useful parameters for
55 # missing attributes are written below
56 run_project(project, ConsoleDecisionHandler())
58# IfcBuildingElementProxy: skip
59# Rücklaufverschraubung: 'HVAC-PipeFitting',
60# Apparate (M_606) 'HVAC-Distributor',
61# 3-Wege-Regelventil PN16: 'HVAC-ThreeWayValve',
62# True * 6
63# efficiency: 0.95
64# flow_temperature: 70
65# nominal_power_consumption: 200
66# return_temperature: 50
67# heat_capacity: 10 * 7
70if __name__ == '__main__':
71 run_example_simple_hvac_aixlib()