Example #1
0
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 load_file():

    prj = Project(load_data=True)

    prj.load_project(utilities.get_full_path(os.path.join("examples",
                                                          "examplefiles",
                                                          "ASHRAE140_900."
                                                          "teaserXML")))

    return prj
Example #3
0
    def click_load_button(self, path):
        """
        Returns a project loaded from XML.
        """
        loaded_prj = Project()
        if path.endswith(".xml"):
            loaded_prj.load_old_teaser(path)
        if path.endswith(".teaserXML"):
            loaded_prj.load_project(path)

        return loaded_prj
Example #4
0
    def click_load_button(self, path):
        """
        Returns a project loaded from XML.
        """
        loaded_prj = Project()
        if path.endswith(".xml"):
            loaded_prj.load_old_teaser(path)
        if path.endswith(".teaserXML"):
            loaded_prj.load_project(path)

        return loaded_prj
Example #5
0
def parameter_room1():

    prj = Project(False)
    prj.name = "VDI_Verification_Room1"

    prj.load_project(
        utilities.get_full_path("examples/examplefiles/VDI6007_Room1.json"))

    prj.buildings[0].calc_building_parameter(number_of_elements=2,
                                             merge_windows=True,
                                             used_library='AixLib')

    return prj
Example #6
0
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_room3():
    '''
    load project of VDI 6007 room from TEASER file
    '''
    prj = Project(False)
    prj.load_project(
        utilitis.get_full_path(
            "examples\\examplefiles\\VDI6007_Room3.teaserXML"))
    '''
    execute VDI calculation for single zone
    '''

    prj.buildings[0].calc_building_parameter(number_of_elements=2,
                                             merge_windows=True,
                                             used_library='AixLib')

    return prj
Example #8
0
def example_save():
    """"This function demonstrates different loading options of TEASER"""

    # In example e4_save we saved two TEASER projects using *.teaserXML and
    # Python package pickle. This example shows how to import these
    # information into your python environment again.

    # To load data from *.teaserXML we can use a simple API function. So
    # first we need to instantiate our API (similar to example
    # e1_generate_archetype). The XML file is called
    # `ArchetypeExample.teaserXML` and saved in the default path. You need to
    #  run e4 first before you can load this example file.

    from teaser.project import Project

    prj = Project()

    load_xml = os.path.join(utilities.get_default_path(),
                            'ArchetypeExample.teaserXML')

    prj.load_project(path=load_xml)
    prj = Project()
    prj.load_project(
        utilities.get_full_path("examples/examplefiles/new.teaserXML"))
    prj.save_project(file_name="new", path=None)

    # To reload data from a pickle file, we do not need to instantiate an
    # API, as pickle will automatically instantiate all classes as they have
    # been saved. The saved file from example e4 is called ´teaser_pickle.p´

    import pickle

    load_pickle = os.path.join(utilities.get_default_path(), 'teaser_pickle.p')

    pickle_prj = pickle.load(open(load_pickle, "rb"))

    # The last option to import data into TEASER is using a CityGML file. The
    # import of CityGML underlies some limitations e.g. concerning data
    # given in the file and the way the buildings are modeled.

    prj_gml = Project()

    load_gml = utilities.get_full_path(
        os.path.join('examples', 'examplefiles', 'CityGMLSample.gml'))

    prj_gml.load_citygml(path=load_gml)
Example #9
0
def parameter_room3():
    
    '''
    load project of VDI 6007 room from TEASER file
    '''
    prj = Project(False)
    prj.load_project(utilitis.get_full_path(
        "examples\\examplefiles\\VDI6007_Room3.teaserXML"))

    '''
    execute VDI calculation for single zone
    '''
    
    prj.buildings[0].calc_building_parameter(number_of_elements=2,
                                             merge_windows=True,
                                             used_library='AixLib')
    
    return prj
Example #10
0
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()
Example #11
0
def example_load():
    """"This function demonstrates different loading options of TEASER"""

    # In example e4_save we saved two TEASER projects using *.teaserjson and
    # Python package pickle. This example shows how to import these
    # information into your python environment again.

    # To load data from *.teaserjson we can use a simple API function. So
    # first we need to instantiate our API (similar to example
    # e1_generate_archetype). The json file is called
    # `ArchetypeExample.teaserjson` and saved in the default path. You need to
    #  run e4 first before you can load this example file.

    from teaser.project import Project

    prj = Project()

    load_json = os.path.join(utilities.get_default_path(),
                             "ArchetypeExample.json")

    prj.load_project(path=load_json)

    prj = Project()
    prj.load_project(
        utilities.get_full_path("examples/examplefiles/unitTest.json"))
    prj.save_project(file_name="unitTest", path=None)

    # To reload data from a pickle file, we do not need to instantiate an
    # API, as pickle will automatically instantiate all classes as they have
    # been saved. The saved file from example e4 is called ´teaser_pickle.p´

    import pickle

    load_pickle = os.path.join(utilities.get_default_path(), "teaser_pickle.p")

    pickle_prj = pickle.load(open(load_pickle, "rb"))
    print(pickle_prj)
Example #12
0
Created July 2015

@author: TEASER 4 Development Team

This Scripts loads an project from TEASER 3 and executes the calculation

'''

from teaser.project import Project
import teaser.logic.utilities as utilitis
'''
load project of VDI 6007 room from  TEASER file
'''
prj = Project(False)

prj.load_project(
    utilitis.get_full_path("examples\\examplefiles\\new.teaserXML"))
'''
execute VDI calculation for single zone
'''

prj.buildings[0].calc_building_parameter('ebc')
'''
parameters inner wall 
'''
print("Parameters for inner wall")
print("r1_iw:", prj.buildings[0].thermal_zones[0].r1_iw, "K/W ---",
      "TEASER 3: 4.62113316216e-06 K/W")
print("c1_iw: ", prj.buildings[0].thermal_zones[0].c1_iw, "kJ/K ---",
      "TEASER 3: 1209810287.22 kJ/K")
print("area_iw: ", prj.buildings[0].thermal_zones[0].area_iw, "qm ---",
      "TEASER 3: 9866.66666667 qm")
Example #13
0
@author: TEASER 4 Development Team

This Scripts loads an project from TEASER 3 and executes the calculation

'''

from teaser.project import Project
import teaser.logic.utilities as utilitis

'''
load project of VDI 6007 room from  TEASER file
'''
prj = Project(False)

prj.load_project(utilitis.get_full_path(
    "examples/examplefiles/new.teaserXML"))

'''
execute VDI calculation for single zone
'''

prj.buildings[0].calc_building_parameter('ebc')

'''
parameters inner wall 
'''
print("Parameters for inner wall")
print("r1_iw:", prj.buildings[0].thermal_zones[0].r1_iw,"K/W ---", "TEASER 3: 4.62113316216e-06 K/W")
print("c1_iw: ", prj.buildings[0].thermal_zones[0].c1_iw,"kJ/K ---", "TEASER 3: 1209810287.22 kJ/K")
print("area_iw: ", prj.buildings[0].thermal_zones[0].area_iw,"qm ---", "TEASER 3: 9866.66666667 qm")
print("alpha_conv_iw: ", prj.buildings[0].thermal_zones[0].alpha_conv_inner_iw,