Coverage for bim2sim/plugins/PluginHKESim/bim2sim_hkesim/examples/e1_simple_project_hvac_hkesim.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_hkesim():
10 """Run an HVAC simulation with the HKESim backend.
12 This example runs an HVAC with the HKESim backend. Specifies project
13 directory and location of the HVAC IFC file. Then, it creates a bim2sim
14 project with the HKESim backend. Simulation settings are specified (here,
15 the aggregations are specified), before the project is executed with the
16 previously specified settings."""
17 # Create a temp directory for the project, feel free to use a "normal"
18 # directory
19 project_path = Path(
20 tempfile.TemporaryDirectory(prefix='bim2sim_example1_hkesim').name)
22 # Set path of ifc for hydraulic domain with the fresh downloaded test models
23 ifc_paths = {
24 IFCDomain.hydraulic:
25 Path(bim2sim.__file__).parent.parent /
26 'test/resources/hydraulic/ifc/'
27 'hvac_heating.ifc'
28 }
29 # Create a project including the folder structure for the project with
30 # teaser as backend and no specified workflow (default workflow is taken)
31 project = Project.create(project_path, ifc_paths, 'HKESim')
33 # set weather file data
34 project.sim_settings.weather_file_path = (
35 Path(bim2sim.__file__).parent.parent /
36 'test/resources/weather_files/DEU_NW_Aachen.105010_TMYx.mos')
38 # specify simulation settings
39 project.sim_settings.aggregations = [
40 'UnderfloorHeating',
41 'Consumer',
42 'PipeStrand',
43 'ParallelPump',
44 'ConsumerHeatingDistributorModule',
45 'GeneratorOneFluid'
46 ]
47 project.sim_settings.group_unidentified = 'name'
49 # Run the project with the ConsoleDecisionHandler. This allows interactive
50 # input to answer upcoming questions regarding the imported IFC.
51 # Correct decision for identification of elements and useful parameters for
52 # missing attributes are written below
53 run_project(project, ConsoleDecisionHandler())
55# Answers to questions:
56# IfcBuildingElementProxy: skip
57# Rücklaufverschraubung: 15 'HVAC-PipeFitting'
58# Apparate (M_606) 6 'HVAC-Distributor',
59# 3-Wege-Regelventil PN16: 19 'HVAC-ThreeWayValve',
60# Dead end: True * 6
61# efficiency: 0.95
62# nominal_power_consumption: 200
65if __name__ == '__main__':
66 run_example_simple_hvac_hkesim()