How to use the teaser.logic.buildingobjects.building.Building 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 / teaser / examples / verification / vdi6007_testcases / vdi6007shared.py View on Github external
Optional weather input

    Returns
    -------
    tz : teaser.logic.buildingobjects.thermalzone.ThermalZone
        Thermal zone object with setup for test case
    """

    if weather is None:
        weather = WeatherData()
        weather.air_temp = np.zeros(timesteps) + 295.15

    prj = Project()
    prj.weather_data = weather

    bldg = Building(prj)
    tz = ThermalZone(bldg)

    model_data = TwoElement(tz, merge_windows=False, t_bt=5)

    if room == "S1":
        model_data.r1_iw = 0.000595693407511  # Yes
        model_data.c1_iw = 14836354.6282  # Yes
        model_data.area_iw = 75.5  # Yes
        model_data.r_rest_ow = 0.03895919557  # Yes
        model_data.r1_ow = 0.00436791293674  # Yes
        model_data.c1_ow = 1600848.94  # Yes
    elif room == "S2":
        model_data.r1_iw = 0.000668895639141
        model_data.c1_iw = 12391363.8631
        model_data.area_iw = 60.5
        model_data.r_rest_ow = 0.01913729904
github RWTH-EBC / TEASER / teaser / examples / verification / vdi6007_testcases / vdi6007_case10_new_core.py View on Github external
ref_file = 'case10_t_amb.csv'
    ref_path = os.path.join(this_path, 'inputs', ref_file)

    t_outside_raw = np.loadtxt(ref_path, delimiter=",")
    t_outside = ([t_outside_raw[2 * i, 1] for i in range(24)])
    t_outside_adj = np.repeat(t_outside, times_per_hour)
    weatherTemperature = np.tile(t_outside_adj, 60)

    weather = WeatherData()
    weather.air_temp = weatherTemperature

    prj = Project()
    prj.weather_data = weather

    bldg = Building(prj)

    tz = ThermalZone(bldg)

    model_data = TwoElement(tz, merge_windows=True, t_bt=5)

    #  Store building parameters for testcase 10
    model_data.r1_iw = 0.000779671554640369
    model_data.c1_iw = 12333949.4129606
    model_data.area_iw = 58
    model_data.r_rest_ow = 0.011638548
    model_data.r1_ow = 0.00171957697767797
    model_data.c1_ow = 4338751.41
    model_data.area_ow = 28
    model_data.outer_wall_areas = [28]
    model_data.window_areas = np.zeros(1)
    model_data.transparent_areas = [7]
github RWTH-EBC / TEASER / teaser / data / input / teaserxml_input.py View on Github external
def _load_building(prj, pyxb_bld, type, project_bind):
    if type == "Building":
        bldg = Building(prj)

    elif type == "Office":
        bldg = Office(prj)

    elif type == "Institute":

        bldg = Institute(prj)

    elif type == "Institute4":
        bldg = Institute4(prj)

    elif type == "Institute8":
        bldg = Institute8(prj)

    elif type == "Residential":
        bldg = SingleFamilyDwelling(prj)
github RWTH-EBC / TEASER / teaser / examples / verification / verification_ASHRAE_140_920.py View on Github external
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
    roof.tilt = 0.0
    roof.inner_convection = 1
    roof.outer_convection = 24.67
github RWTH-EBC / TEASER / teaser / examples / e9_building_data_import_from_excel.py View on Github external
if element.construction_type is None:
            warnings.warn(
                'In zone "%s" the %s construction "%s" could not be loaded from the TypeBuildingElements.json, '
                "an error will occur due to missing data for calculation."
                "Check for spelling and the correct combination of building age and construction type."
                "Here is the list of faulty entries:\n%s"
                "\nThese entries can easily be found checking the stated index in the produced ZonedInput.xlsx"
                % (
                    group["zone"].iloc[0],
                    element.name,
                    group["OuterWallConstruction"].iloc[0],
                    group,
                )
            )

    bldg = Building(parent=project)
    bldg.name = building_name
    bldg.year_of_construction = construction_age
    bldg.with_ahu = True  # HardCodedInput
    if bldg.with_ahu is True:
        bldg.central_ahu.heat_recovery = True  # HardCodedInput
        bldg.central_ahu.efficiency_recovery = 0.35  # HardCodedInput
        bldg.central_ahu.temperature_profile = 25 * [273.15 + 18]  # HardCodedInput
        bldg.central_ahu.min_relative_humidity_profile = 25 * [0]  # HardCodedInput
        bldg.central_ahu.max_relative_humidity_profile = 25 * [1]  # HardCodedInput
        bldg.central_ahu.v_flow_profile = 25 * [1]  # HardCodedInput

    # Parameters that need hard coding in teasers logic classes
    # 1. "use_set_back" needs hard coding at aixlib.py in the init; defines
    # if the in the useconditions stated
    #   heating_time with the respective set_back_temp should be applied.
    #   use_set_back = false -> all hours of the day
github RWTH-EBC / TEASER / teaser / examples / e6_generate_building.py View on Github external
# Project (e.g. for Material properties and typical wall constructions.
    # This can take a few seconds, depending on the size of the used data base.

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

    # Instantiate a Building class and set the Project API as a parent to
    # this building. This will automatically add this building and all its
    # future changes to the project. This is helpful as we can use the data
    # base and API functions (like explained in e2 - e5). We also set some
    # building parameters. Be careful: Dymola does not like whitespaces in
    # names and filenames, thus we will delete them anyway in TEASER.

    from teaser.logic.buildingobjects.building import Building

    bldg = Building(parent=prj)
    bldg.name = "SuperExampleBuilding"
    bldg.street_name = "AwesomeAvenue42"
    bldg.city = "46325FantasticTown"
    bldg.year_of_construction = 2015
    bldg.number_of_floors = 1
    bldg.height_of_floors = 3.5

    # Instantiate a ThermalZone class and set the Building as a parent of it.
    # Set some parameters of the thermal zone. Be careful: Dymola does not
    # like whitespaces in  names and filenames, thus we will delete them
    # anyway in TEASER.

    from teaser.logic.buildingobjects.thermalzone import ThermalZone

    tz = ThermalZone(parent=bldg)
    tz.name = "LivingRoom"
github RWTH-EBC / TEASER / teaser / logic / buildingobjects / building.py View on Github external
def parent(self, value):

        if value is not None:

            ass_error_1 = "Parent has to be an instance of Project()"

            assert type(value).__name__ == "Project", ass_error_1

            self.__parent = value

            if inspect.isclass(Building):
                if self in self.__parent.buildings:
                    pass
                else:
                    self.__parent.buildings.append(self)

        else:

            self.__parent = None
github RWTH-EBC / TEASER / teaser / gui / controller / controller.py View on Github external
def click_add_new_building(self, current_project, openId):
        """
        Lets CalcProject create a new building with the given ID.
        """
        return Building(current_project, openId)
github RWTH-EBC / TEASER / teaser / examples / verification / verification_ASHRAE_140_600.py View on Github external
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 = "TestRoom600"
    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
    roof.tilt = 0.0
    roof.inner_convection = 1