Coverage for teaser/logic/archetypebuildings/residential.py: 83%
6 statements
« prev ^ index » next coverage.py v7.4.4, created at 2025-04-29 16:01 +0000
« prev ^ index » next coverage.py v7.4.4, created at 2025-04-29 16:01 +0000
1# created June 2015
2# by TEASER4 Development Team
5from teaser.logic.buildingobjects.building import Building
8class Residential(Building):
9 """Base class for each residential archetype.
11 This is the base class for all residential archetype buildings (BMVBS,
12 UrbanReNet, Tabula, etc.). It is a subclass of Building and introduces
13 several parameters to be obligatory (parent, name, year_of_construction,
14 net_leased_area)
16 Please use this class to create new archetype methodologies.
18 Parameters
19 ----------
21 parent: Project()
22 The parent class of this object, the Project the Building belongs to.
23 Allows for better control of hierarchical structures. If not None it
24 adds this Building instance to Project.buildings.
25 (default: None)
26 name : str
27 Individual name
28 year_of_construction : int
29 Year of first construction
30 net_leased_area : float [m2]
31 Total net leased area of building. This is area is NOT the footprint
32 of a building
33 with_ahu : Boolean
34 If set to True, an empty instance of BuildingAHU is instantiated and
35 assigned to attribute central_ahu. This instance holds information for
36 central Air Handling units. Default is False.
37 internal_gains_mode: int [1, 2, 3]
38 mode for the internal gains calculation done in AixLib:
40 1. Temperature and activity degree dependent heat flux calculation for persons. The
41 calculation is based on SIA 2024 (default)
42 2. Temperature and activity degree independent heat flux calculation for persons, the max.
43 heatflowrate is prescribed by the parameter
44 fixed_heat_flow_rate_persons.
45 3. Temperature and activity degree dependent calculation with
46 consideration of moisture and co2. The moisture calculation is
47 based on SIA 2024 (2015) and regards persons and non-persons, the co2 calculation is based on
48 Engineering ToolBox (2004) and regards only persons.
49 inner_wall_approximation_approach : str
50 'teaser_default' (default) sets length of inner walls = typical
51 length * height of floors + 2 * typical width * height of floors
52 'typical_minus_outer' sets length of inner walls = 2 * typical
53 length * height of floors + 2 * typical width * height of floors
54 - length of outer or interzonal walls
55 'typical_minus_outer_extended' like 'typical_minus_outer', but also
56 considers that
57 a) a non-complete "average room" reduces its circumference
58 proportional to the square root of the area
59 b) rooftops, windows and ground floors (= walls with border to
60 soil) may have a vertical share
62 Attributes
63 ----------
64 central_ahu : instance of BuildingAHU
65 Teaser Instance of BuildingAHU if a central AHU is embedded into the
66 building (currently mostly needed for AixLib simulation).
67 number_of_floors : int
68 number of floors above ground (default: None)
69 height_of_floors : float [m]
70 Average height of the floors (default: None)
71 internal_id : float
72 Random id for the distinction between different buildings.
73 year_of_retrofit : int
74 Year of last retrofit.
75 type_of_building : string
76 Type of a Building (e.g. Building (unspecified), Office etc.).
77 building_id : None
78 ID of building, can be set by the user to keep track of a building
79 even outside of TEASER, e.g. in a simulation or in post-processing.
80 This is not the same as internal_id, as internal_id is e.g. not
81 exported to Modelica models!
82 street_name : string
83 Name of the street the building is located at. (optional)
84 city : string
85 Name of the city the building is located at. (optional)
86 longitude : float [degree]
87 Longitude of building location.
88 latitude : float [degree]
89 Latitude of building location.
90 thermal_zones : list
91 List with instances of ThermalZone(), that are located in this building.
92 outer_area : dict [degree: m2]
93 Dictionary with orientation as key and sum of outer wall areas of
94 that direction as value.
95 window_area : dict [degree: m2]
96 Dictionary with orientation as key and sum of window areas of
97 that direction as value.
98 bldg_height : float [m]
99 Total building height.
100 volume : float [m3]
101 Total volume of all thermal zones.
102 sum_heat_load : float [W]
103 Total heating load of all thermal zones.
104 sum_cooling_load : float [W]
105 Total heating load of all thermal zones. (currently not supported)
106 number_of_elements_calc : int
107 Number of elements that are used for thermal zone calculation in this
108 building.
110 1. OneElement
111 2. TwoElement
112 3. ThreeElement
113 4. FourElement
115 merge_windows_calc : boolean
116 True for merging the windows into the outer wall's RC-combination,
117 False for separate resistance for window, default is False
118 used_library_calc : str
119 'AixLib' for https://github.com/RWTH-EBC/AixLib
120 'IBPSA' for https://github.com/ibpsa/modelica
121 library_attr : Annex() or AixLib() instance
122 Classes with specific functions and attributes for building models in
123 IBPSA and AixLib. Python classes can be found in calculation package.
125 """
127 def __init__(
128 self,
129 parent,
130 name,
131 year_of_construction,
132 net_leased_area,
133 with_ahu=False,
134 internal_gains_mode=1,
135 inner_wall_approximation_approach='teaser_default'
136 ):
137 """Constructor of Residential archetype building
138 """
140 super(Residential, self).__init__(
141 parent,
142 name,
143 year_of_construction,
144 net_leased_area,
145 with_ahu,
146 internal_gains_mode,
147 inner_wall_approximation_approach
148 )
150 def generate_archetype(self):
151 """Generates an archetype building.
153 If you want to define you own archetype methodology please use this
154 function call to do so.
156 """
158 pass