How to use the teaser.project.Project function in teaser

To help you get started, we’ve selected a few teaser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github RWTH-EBC / TEASER / tests / test_tabula_sfh_dk.py View on Github external
from teaser.project import Project
prj = Project(False)


class Test_tabula_sfh_dk(object):
    global prj



    def test_tabula_de_sfh_dk_area_2009(self):
        """
        Test for area estimation of tabula sfh
        """
        prj.add_residential(
            method='tabula_dk',
            usage='single_family_house',
            name="ResidentialBuilding",
            year_of_construction=2008,
github RWTH-EBC / TEASER / tests / test_examples.py View on Github external
"""
Created August 2019

@author: TEASER Development Team
"""

from teaser.logic import utilities
from teaser.project import Project
import math
import os
import warnings as warnings

prj = Project(True)


class Test_examples(object):
    """Unit Tests for TEASER"""

    global prj

    def test_e1_example_generate_archetype(self):
        """Tests the executability of example 1"""
        from teaser.examples import e1_generate_archetype as e1

        prj = e1.example_generate_archetype()

        assert prj.name == "ArchetypeExample"

    def test_e2_example_export_aixlib(self):
github RWTH-EBC / TEASER / teaser / examples / verification / verification_ASHRAE_140_900.py View on Github external
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
github RWTH-EBC / TEASER / teaser / examples / verification / verification_ASHRAE_140_900.py View on Github external
----------
    number_of_elements: int
        Number of elements of model
    path: str (optional)
        Path where Project should be stored as .teaserXML
    save: bool (optional)
        True if Project should be stored as .teaserXML at path

    Returns
    -------

    prj: Project
        Project that contains the building with the test room

    """
    prj = Project(load_data=True)
    prj.name = "ASHRAE140Verification"

    bldg = Building(parent=prj)
    bldg.name = "TestBuilding"

    tz = ThermalZone(parent=bldg)
    tz.name = "TestRoom900"
    tz.area = 8.0 * 6.0
    tz.volume = tz.area * 2.7
    tz.use_conditions = UseConditions(parent=tz)
    tz.use_conditions.infiltration_rate = 0.41

    roof = Rooftop(parent=tz)
    roof.name = "Roof"
    roof.area = 8.0 * 6.0
    roof.orientation = -1.0
github RWTH-EBC / TEASER / teaser / examples / verification / verification_room10.py View on Github external
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()
github RWTH-EBC / TEASER / teaser / examples / verification / verification_ASHRAE_140_920.py View on Github external
----------
    number_of_elements: int
        Number of elements of model
    path: str (optional)
        Path where Project should be stored as .teaserXML
    save: bool (optional)
        True if Project should be stored as .teaserXML at path

    Returns
    -------

    prj: Project
        Project that contains the building with the test room

    """
    prj = Project(load_data=True)
    prj.name = "ASHRAE140Verification"

    bldg = Building(parent=prj)
    bldg.name = "TestBuilding"

    tz = ThermalZone(parent=bldg)
    tz.name = "TestRoom920"
    tz.area = 8.0 * 6.0
    tz.volume = tz.area * 2.7
    tz.use_conditions = UseConditions(parent=tz)
    tz.use_conditions.infiltration_rate = 0.41

    roof = Rooftop(parent=tz)
    roof.name = "Roof"
    roof.area = 8.0 * 6.0
    roof.orientation = -1.0
github RWTH-EBC / TEASER / teaser / examples / e5_load.py View on Github external
# 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"))
    print(pickle_prj)
github RWTH-EBC / TEASER / teaser / examples / verification / verification_room1.py View on Github external
def parameter_room1():

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

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

    prj.buildings[0].calc_building_parameter(
        number_of_elements=2,
        merge_windows=True,
        used_library='AixLib')
    
    return prj
github RWTH-EBC / TEASER / teaser / examples / verification / compareteaser.py View on Github external
'''
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
'''
if __name__ == "__main__":
    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")