def parameter_room10(): """"First thing we need to do is to import our Project API module""" from teaser.project import Project """We instantiate the Project class. The parameter load_data = True indicates that we load the XML data bases into our Project. This can take a few sec.""" prj = Project(load_data=True) """We load the given test room defined in teaserXML-file""" prj.load_project(utilitis.get_full_path( "examples\\examplefiles\\VDI6007_Room10.teaserXML")) """Then we calculate all parameter with the calculation core 'vdi', that is exactly as defined in VDI 6007-1.""" prj.calc_all_buildings(number_of_elements=2, merge_windows=True, used_library='AixLib') """After this, we can export our projects as .txt.""" prj.export_parameters_txt()
def parameter_room10(): prj = Project(load_data=True) prj.load_project( utilities.get_full_path( "examples/examplefiles/VDI6007_Room10.teaserXML")) prj.buildings[0].calc_building_parameter(number_of_elements=2, merge_windows=True, used_library='AixLib') prj.export_parameters_txt()
def parameter_room10(): """"First thing we need to do is to import our Project API module""" from teaser.project import Project """We instantiate the Project class. The parameter load_data = True indicates that we load the XML data bases into our Project. This can take a few sec.""" prj = Project(load_data=True) """We load the given test room defined in teaserXML-file""" prj.load_project( utilitis.get_full_path( "examples\\examplefiles\\VDI6007_Room10.teaserXML")) """Then we calculate all parameter with the calculation core 'vdi', that is exactly as defined in VDI 6007-1.""" prj.calc_all_buildings(number_of_elements=2, merge_windows=True, used_library='AixLib') """After this, we can export our projects as .txt.""" prj.export_parameters_txt()
def main(): prj = Project(load_data=True) prj.name = "ResidentialCommunityUK_rad" # Building types: detached, terrace, office_lowenergy-early1980s, office_highcost-mid1980s. # Community created based on prj = load_namespace('teaser_prj_residentialUK') prj.name = "ResidentialCommunityUK_rad_2elements" prj.used_library_calc = 'IBPSA' prj.number_of_elements_calc = 3 prj.weather_file_path = os.path.join('path_to_weather_file', 'Nottingham_TRY.mos') prj.calc_all_buildings(raise_errors=True) store_namespace('teaser_prj_residential',prj) bldg_list=[] for bldg in prj.buildings: bldg_list.append(bldg.name) store_namespace('teaser_bldgs_residential',bldg_list) prj.export_parameters_txt(path="\\models") prj.export_ibpsa( internal_id=None, path="\models\\" ) for bldg in prj.buildings: for zone in bldg.thermal_zones: path = os.path.join("\models\\", prj.name) create_ibpsa_mpc_model(prj,bldg,zone,path=path) create_ibpsa_PI_model(prj,bldg,zone,path=path)
def example_type_building(): """"First thing we need to do is to import our Project API module""" from teaser.project import Project """We instantiate the Project class. The parameter load_data = True indicates that we load the XML data bases into our Project. This can take a few sec.""" prj = Project(load_data=True) prj.name = "ArchetypeBuildings_Ref" """The five functions starting with type_bldg giving us the opportunity to create the specific type building (e.g. type_bldg_residential). The function automatically calculates all the necessary parameter. If not specified different it uses vdi calculation method.""" prj.type_bldg_residential(name="ResidentialBuilding", year_of_construction=1988, number_of_floors=2, height_of_floors=3.5, net_leased_area=100, with_ahu=True, residential_layout=1, neighbour_buildings=1, attic=1, cellar=1, construction_type="heavy", dormer=1) prj.type_bldg_office(name="Office1", year_of_construction=1988, number_of_floors=2, height_of_floors=3.5, net_leased_area=100, office_layout=1, window_layout=1, with_ahu=True, construction_type="heavy") ''' We need to set the projects calculation method. The library we want to use is AixLib, we are using a two element model and want an extra resistance for the windows. To export the parameters to a Modelica record, we use the export_aixlib function. path = None indicates, that we want to store the records in TEASER'S Output folder ''' prj.used_library_calc = 'AixLib' prj.number_of_elements_calc = 2 prj.merge_windows_calc = False prj.calc_all_buildings() ''' Export the Modelica Record. If you have a Dymola License you can export the model with a central AHU (MultizoneEquipped) (only default for office and institute buildings) ''' prj.export_aixlib(building_model="MultizoneEquipped", zone_model="ThermalZoneEquipped", corG=True, internal_id=None, path=None) ''' For OpenModelica you need to exclude the centralAHU (because it is using state machines). Therefore use the building_model "Multizone" ''' #prj.export_aixlib(building_model="Multizone", # zone_model="ThermalZoneEquipped", # corG=True, # internal_id=None, # path=None) '''Or we use Annex60 method (e.g with four elements). Which exports one Model per zone''' #prj.used_library_calc = 'Annex60' #prj.number_of_elements_calc = 4 #prj.merge_windows_calc = False #prj.calc_all_buildings() #prj.export_annex() """Now we retrofit all buildings in the year 2015 (EnEV2014). \ That includes new insulation layer and new windows. The name is changed \ to Retrofit""" prj.name = "ArchetypeBuildings_Retrofit" prj.retrofit_all_buildings(2015) prj.calc_all_buildings() '''You could also change the exports here as seen above''' prj.export_aixlib(building_model="MultizoneEquipped", zone_model="ThermalZoneEquipped", corG=True, internal_id=None, path=None) prj.save_project("Retrofit_Building", path=None) '''Save the human readable output txt''' prj.export_parameters_txt(path=None) ''' Save the human readable output txt ''' prj.save_citygml(path=None)
def example_type_building(): """"First thing we need to do is to import our Project API module""" from teaser.project import Project """We instantiate the Project class. The parameter load_data = True indicates that we load the XML data bases into our Project. This can take a few sec.""" prj = Project(load_data=True) prj.name = "ArchetypeBuildings" """The five functions starting with type_bldg giving us the opportunity to create the specific type building (e.g. type_bldg_residential). The function automatically calculates all the necessary parameter. If not specified different it uses vdi calculation method.""" prj.type_bldg_residential(name="ResidentialBuilding", year_of_construction=1988, number_of_floors=2, height_of_floors=3.5, net_leased_area=100, with_ahu=True, residential_layout=1, neighbour_buildings=1, attic=1, cellar=1, construction_type="heavy", dormer=1) prj.type_bldg_office(name="Office1", year_of_construction=1988, number_of_floors=2, height_of_floors=3.5, net_leased_area=100, office_layout=1, window_layout=1, with_ahu=True, construction_type="heavy") """We need to set the projects calculation method. The library we want to use is AixLib, we are using a two element model and want an extra resistance for the windows. To export the parameters to a Modelica record, we use the export_aixlib function. path = None indicates, that we want to store the records in \ TEASER'S Output folder""" prj.used_library_calc = 'AixLib' prj.number_of_elements_calc = 2 prj.merge_windows_calc = False prj.export_aixlib(building_model="MultizoneEquipped", zone_model="ThermalZoneEquipped", corG=True, internal_id=None, path=None) """or we could also use the Annex60 models""" #prj.used_library_calc = "Annex60" #prj.export_annex(number_of_elements=2, # merge_windows=False, # internal_id=None, # path=None) """Now we retrofit all buildings in the year 2015 (EnEV2014). \ That includes new insulation layer and new windows. The name is changed \ to Retrofit""" prj.name = "Project_Retrofit" prj.retrofit_all_buildings(2015) prj.calc_all_buildings(number_of_elements=2, merge_windows=False, used_library='AixLib') prj.export_aixlib(building_model="MultizoneEquipped", zone_model="ThermalZoneEquipped", corG=True, internal_id=None, path=None) prj.save_project("Retrofit_Building", path=None) '''Save the human readable output txt''' prj.export_parameters_txt(path=None) ''' Save the human readable output txt ''' prj.save_citygml(path=None)