Skip to content

Commit

Permalink
Delete TransferSystem class
Browse files Browse the repository at this point in the history
  • Loading branch information
HoeppJ committed Jan 20, 2025
1 parent 7465c61 commit bd1e6b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 80 deletions.
19 changes: 0 additions & 19 deletions teaser/logic/buildingobjects/buildingsystems/transfer_systems.py

This file was deleted.

47 changes: 4 additions & 43 deletions teaser/logic/buildingobjects/thermalzone.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
from teaser.logic.buildingobjects.calculation.two_element import TwoElement
from teaser.logic.buildingobjects.calculation.three_element import ThreeElement
from teaser.logic.buildingobjects.calculation.four_element import FourElement
# from teaser.logic.buildingobjects.buildingsystems.transfer_systems import \
# TransferSystems



class ThermalZone(object):
Expand Down Expand Up @@ -75,11 +74,6 @@ class ThermalZone(object):
Temperature directly at the outer side of ground floors for static
heat load calculation.
The input of t_ground is ALWAYS in Kelvin
# transfer_system : Union[TransferSystems]
# Selected transfer system for simplified modeling of heat transfer.
# Check TransferSystem class for more information. Default is IdealHeater
# which has no time delay at all. UFH and CCA are only available for 4
# element model.
transfer_system_pt1_K: float []
Gain for PT1 for damped heat transfer
transfer_system_pt1_T: float [h]
Expand Down Expand Up @@ -118,7 +112,6 @@ def __init__(self, parent=None):
self.density_air = 1.25
self.heat_capac_air = 1002
self.t_ground = 286.15
# self._transfer_system = TransferSystems.IdealHeater
self._transfer_system_pt1_K = 0
self._transfer_system_pt1_T = 0
self._transfer_system_fraHeaRad = 0
Expand Down Expand Up @@ -713,38 +706,6 @@ def t_outside(self, value):
except:
raise ValueError("Can't convert temperature to float")

# @property
# def transfer_system(self):
# return self._transfer_system
#
# @transfer_system.setter
# def transfer_system(self, value):
# if value not in [ts for ts in TransferSystems]:
# raise ValueError(f"{value} is not a valid transfer system")
#
# if value in [TransferSystems.IdealHeater, TransferSystems.Radiator]:
# self._transfer_system = value
#
# elif value in [
# TransferSystems.UnderFloorHeating,
# TransferSystems.ConcreteCoreActivation
# ]:
# if not hasattr(self, "model_attr"):
# warnings.warn(
# f"Zone parameters for {self} were not calculated yet."
# f" Please make sure to use UnderFloorHeating and"
# f" ConcreteCoreActivation transfer system only when "
# f"using FourElement!")
# self._transfer_system = value
# # TODO @Jonatan
# elif isinstance(self.model_attr, FourElement):
# self._transfer_system = value
# else:
# raise ValueError(
# f"TransferSystem {value} can only be used with FourElement"
# f" thermal zone model, but you are using "
# f"{self.model_attr}")


@property
def transfer_system_pt1_K(self):
Expand All @@ -768,7 +729,7 @@ def transfer_system_pt1_K(self, value):
def transfer_system_pt1_T(self):
return self._transfer_system_pt1_T

@transfer_system_pt1_K.setter
@transfer_system_pt1_T.setter
def transfer_system_pt1_T(self, value):

if isinstance(value, float):
Expand All @@ -786,7 +747,7 @@ def transfer_system_pt1_T(self, value):
def transfer_system_fraHeaRad(self):
return self._transfer_system_fraHeaRad

@transfer_system_pt1_K.setter
@transfer_system_fraHeaRad.setter
def transfer_system_fraHeaRad(self, value):

if isinstance(value, float):
Expand All @@ -804,7 +765,7 @@ def transfer_system_fraHeaRad(self, value):
def transfer_system_fraCooRad(self):
return self._transfer_system_fraCooRad

@transfer_system_pt1_K.setter
@transfer_system_fraCooRad.setter
def transfer_system_fraCooRad(self, value):

if isinstance(value, float):
Expand Down
18 changes: 0 additions & 18 deletions tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3239,21 +3239,3 @@ def test_tz_naming(self):
assert tz2.name == "kitchen"
assert tz3.name == "living_1"

def test_transfer_systems(self):
# TODO #806 need to finish the tests and refactor calc_zone_parameters
# function similar to calc_building_parameter functino in #801
from teaser.logic.buildingobjects.building import Building
from teaser.logic.buildingobjects.thermalzone import ThermalZone
from teaser.logic.buildingobjects.buildingsystems.transfer_systems import TransferSystems

prj.number_of_elements_calc = 4
bld = Building(parent=prj, )
tz1 = ThermalZone(parent=bld)

tz1.transfer_system = TransferSystems.IdealHeater
tz2 = ThermalZone(parent=bld)
tz2.transfer_system = TransferSystems.Radiator
tz3 = ThermalZone(parent=bld)
tz3.transfer_system = TransferSystems.UnderFloorHeating
tz4 = ThermalZone(parent=bld)
tz4.transfer_system = TransferSystems.ConcreteCoreActivation

0 comments on commit bd1e6b5

Please sign in to comment.