Skip to content

Commit

Permalink
Merge pull request #6 from RWTH-EBC/issue2_ResidentialSetter
Browse files Browse the repository at this point in the history
Issue2 residential setter
  • Loading branch information
PRemmen committed Oct 23, 2015
2 parents 3ebc73d + 0d82000 commit 4d5e0cf
Show file tree
Hide file tree
Showing 10 changed files with 123 additions and 120 deletions.
Binary file modified doc/_build/doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file modified doc/_build/doctrees/teaser.Project.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion doc/_build/html/searchindex.js

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions doc/_build/html/teaser.Logic.BuildingObjects.TypeBuildings.html
Original file line number Diff line number Diff line change
Expand Up @@ -246,31 +246,31 @@ <h1>TypeBuildings package<a class="headerlink" href="#typebuildings-package" tit
<p><strong>residential_layout</strong> : int</p>
<blockquote>
<div><p>type of floor plan</p>
<p>1: compact
2: elongated/complex</p>
<p>0: compact
1: elongated/complex</p>
</div></blockquote>
<p><strong>neighbour_buildings</strong> : int</p>
<blockquote>
<div><p>neighbour</p>
<p>1: no neighbour
2: one neighbour
3: two neighbours</p>
<p>0: no neighbour
1: one neighbour
2: two neighbours</p>
</div></blockquote>
<p><strong>attic</strong> : int</p>
<blockquote>
<div><p>type of attic</p>
<p>1: flat roof
2: non heated attic
3: partly heated attic
4: heated attic</p>
<p>0: flat roof
1: non heated attic
2: partly heated attic
3: heated attic</p>
</div></blockquote>
<p><strong>cellar</strong> : int</p>
<blockquote>
<div><p>type of cellar</p>
<p>1: no cellar
2: non heated cellar
3: partly heated cellar
4: heated cellar</p>
<p>0: no cellar
1: non heated cellar
2: partly heated cellar
3: heated cellar</p>
</div></blockquote>
<p><strong>construction_type</strong> : str</p>
<blockquote>
Expand All @@ -281,8 +281,8 @@ <h1>TypeBuildings package<a class="headerlink" href="#typebuildings-package" tit
<p><strong>dormer</strong> : str</p>
<blockquote class="last">
<div><p>construction type</p>
<p>1: dormer
2: no dormer</p>
<p>0: no dormer
1: dormer</p>
</div></blockquote>
</td>
</tr>
Expand Down
30 changes: 15 additions & 15 deletions doc/_build/html/teaser.Project.html
Original file line number Diff line number Diff line change
Expand Up @@ -566,31 +566,31 @@ <h3>Navigation</h3>
<p><strong>residential_layout</strong> : int</p>
<blockquote>
<div><p>type of floor plan</p>
<p>1: compact
2: elongated/complex</p>
<p>0: compact
1: elongated/complex</p>
</div></blockquote>
<p><strong>neighbour_buildings</strong> : int</p>
<blockquote>
<div><p>neighbour</p>
<p>1: no neighbour
2: one neighbour
3: two neighbours</p>
<p>0: no neighbour
1: one neighbour
2: two neighbours</p>
</div></blockquote>
<p><strong>attic</strong> : int</p>
<blockquote>
<div><p>type of attic</p>
<p>1: flat roof
2: non heated attic
3: partly heated attic
4: heated attic</p>
<p>0: flat roof
1: non heated attic
2: partly heated attic
3: heated attic</p>
</div></blockquote>
<p><strong>cellar</strong> : int</p>
<blockquote>
<div><p>type of cellar</p>
<p>1: no cellar
2: non heated cellar
3: partly heated cellar
4: heated cellar</p>
<p>0: no cellar
1: non heated cellar
2: partly heated cellar
3: heated cellar</p>
</div></blockquote>
<p><strong>construction_type</strong> : str</p>
<blockquote>
Expand All @@ -601,8 +601,8 @@ <h3>Navigation</h3>
<p><strong>dormer</strong> : str</p>
<blockquote>
<div><p>construction type</p>
<p>1: dormer
2: no dormer</p>
<p>0: no dormer
: dormer</p>
</div></blockquote>
</td>
</tr>
Expand Down
30 changes: 15 additions & 15 deletions teaser/Examples/Example_Melaten_retrofit.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Created July 2015
#Marcus Fuchs
# Created July 2015
# Marcus Fuchs

'''
This module contains an example for the retrofit of an entire district (Melaten)
Expand Down Expand Up @@ -37,10 +37,10 @@ def __init__(self):
def main():

this_path = os.path.dirname(__file__)
input_path = os.path.join(this_path,
input_path = os.path.join(this_path,
'ExampleInputFiles',
'MelatenXML')
output_path = os.path.join(os.path.dirname(this_path),
output_path = os.path.join(os.path.dirname(this_path),
'OutputData'
)

Expand Down Expand Up @@ -133,7 +133,7 @@ def create_reference_project(info_list):
print(building)

if building.usage_type == 'office':
prj.type_bldg_office(name=str(building.building_number),
prj.type_bldg_office(name=str(building.building_number),
year_of_construction=building.year_of_construction,
number_of_floors=building.floors,
height_of_floors=building.height_of_floors,
Expand All @@ -142,7 +142,7 @@ def create_reference_project(info_list):
window_layout=0,
construction_type=building.weight)
elif building.usage_type == 'institute8':
prj.type_bldg_institute8(name=str(building.building_number),
prj.type_bldg_institute8(name=str(building.building_number),
year_of_construction=building.year_of_construction,
number_of_floors=building.floors,
height_of_floors=building.height_of_floors,
Expand All @@ -151,7 +151,7 @@ def create_reference_project(info_list):
window_layout=0,
construction_type=building.weight)
elif building.usage_type == 'institute4':
prj.type_bldg_institute4(name=str(building.building_number),
prj.type_bldg_institute4(name=str(building.building_number),
year_of_construction=building.year_of_construction,
number_of_floors=building.floors,
height_of_floors=building.height_of_floors,
Expand All @@ -160,7 +160,7 @@ def create_reference_project(info_list):
window_layout=0,
construction_type=building.weight)
elif building.usage_type == 'institute':
prj.type_bldg_institute(name=str(building.building_number),
prj.type_bldg_institute(name=str(building.building_number),
year_of_construction=building.year_of_construction,
number_of_floors=building.floors,
height_of_floors=building.height_of_floors,
Expand All @@ -169,22 +169,22 @@ def create_reference_project(info_list):
window_layout=0,
construction_type=building.weight)
elif building.usage_type == 'residential':
prj.type_bldg_residential(name=str(building.building_number),
prj.type_bldg_residential(name=str(building.building_number),
year_of_construction=building.year_of_construction,
number_of_floors=building.floors,
height_of_floors=building.height_of_floors,
net_leased_area=building.area,
residential_layout=1,
neighbour_buildings=1,
attic=1,
cellar=1,
residential_layout=0,
neighbour_buildings=0,
attic=0,
cellar=0,
construction_type=building.weight,
dormer=1)
dormer=0)
return prj




# Main function
if __name__ == '__main__':
main()
main()
81 changes: 42 additions & 39 deletions teaser/Logic/BuildingObjects/TypeBuildings/Residential.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,31 +48,31 @@ class Residential(TypeBuilding):
residential_layout : int
type of floor plan
1: compact
2: elongated/complex
0: compact
1: elongated/complex
neighbour_buildings : int
neighbour
1: no neighbour
2: one neighbour
3: two neighbours
0: no neighbour
1: one neighbour
2: two neighbours
attic : int
type of attic
1: flat roof
2: non heated attic
3: partly heated attic
4: heated attic
0: flat roof
1: non heated attic
2: partly heated attic
3: heated attic
cellar : int
type of cellar
1: no cellar
2: non heated cellar
3: partly heated cellar
4: heated cellar
0: no cellar
1: non heated cellar
2: partly heated cellar
3: heated cellar
construction_type : str
construction type
Expand All @@ -83,8 +83,8 @@ class Residential(TypeBuilding):
dormer : str
construction type
0: no dormer
1: dormer
2: no dormer
Note
----------
Expand Down Expand Up @@ -213,69 +213,69 @@ def __init__(self, parent, name, year_of_construction=None,
self._est_cellar_wall_area = 0
self._est_factor_volume = 0.0

self.est_factor_neighbour = 0.0 # n_Nachbar
self.est_extra_floor_area = 0.0 # q_Fa
self.est_factor_neighbour = 0.0 # n_Nachbar
self.est_extra_floor_area = 0.0 # q_Fa

if self.neighbour_buildings == 1:
if self.neighbour_buildings == 0:
self._est_factor_neighbour = 0.0
self._est_extra_floor_area = 50.0
elif self.neighbour_buildings == 2:
elif self.neighbour_buildings == 1:
self._est_factor_neighbour = 1.0
self._est_extra_floor_area = 30.0
elif self.neighbour_buildings == 3:
elif self.neighbour_buildings == 2:
self._est_factor_neighbour = 2.0
self._est_extra_floor_area = 10.0

self._est_facade_to_floor_area = 0.0 # p_Fa

if self.residential_layout == 1:
if self.residential_layout == 0:
self._est_facade_to_floor_area = 0.66
elif self.residential_layout == 2:
elif self.residential_layout == 1:
self.est_facade_to_floor_area = 0.8

self._est_factor_heated_attic = 0.0 # f_TB_DG
self._est_area_per_floor = 0.0 # p_DA
self._est_area_per_roof = 0.0 # p_OG

if self.attic == 1:
if self.attic == 0:
self._est_factor_heated_attic = 0.0
self._est_area_per_floor = 1.33
self._est_area_per_roof = 0.0
elif self.attic == 2:
elif self.attic == 1:
self._est_factor_heated_attic = 0.0
self._est_area_per_floor = 0.0
self._est_area_per_roof = 1.33
elif self.attic == 3:
elif self.attic == 2:
self._est_factor_heated_attic = 0.5
self._est_area_per_floor = 0.75
self._est_area_per_roof = 0.67
elif self.attic == 4:
elif self.attic == 3:
self._est_factor_heated_attic = 1.0
self._est_area_per_floor = 1.5
self._est_area_per_roof = 0.0

self._est_factor_heated_cellar = 0.0 # f_TB_KG

if self.cellar == 1:
if self.cellar == 0:
self._est_factor_heated_cellar = 0.0
elif self.cellar == 2:
elif self.cellar == 1:
self._est_factor_heated_cellar = 0.0
elif self.cellar == 3:
elif self.cellar == 2:
self._est_factor_heated_cellar = 0.5
elif self.cellar == 4:
elif self.cellar == 3:
self._est_factor_heated_cellar = 1.0

self._est_factor_dormer = 0.0

if self.dormer == 1:
self._est_factor_dormer = 1.3
elif self.dormer == 2:
if self.dormer == 0:
self._est_factor_dormer = 1.0
elif self.dormer == 1:
self._est_factor_dormer = 1.3

self.file_ahu = "./Tables/Residential/AHU_Residential.mat"
self.file_internal_gains = "./Tables/Residential/InternalGains_Residential.mat"
self.file_set_t = "./Tables/Residential/Tset_Residential.mat"
self.file_weather = "./Tables/"+self.parent.weather_file_name
self.file_weather = "./Tables/" + self.parent.weather_file_name

def generate_residential(self):
'''Generates a residential building.
Expand All @@ -286,24 +286,27 @@ def generate_residential(self):
'''

self._number_of_heated_floors = self._est_factor_heated_cellar +\
self._number_of_heated_floors = self._est_factor_heated_cellar + \
self.number_of_floors + self.est_living_area_factor\
*self._est_factor_heated_attic

self._living_area_per_floor = self.net_leased_area /\
self._living_area_per_floor = self.net_leased_area / \
self._number_of_heated_floors

self._est_ground_floor_area = self.est_bottom_building_closure * \
self._living_area_per_floor

self._est_roof_area =self.est_upper_building_closure* \
self._est_factor_dormer*self._est_area_per_floor *\
self._est_roof_area = self.est_upper_building_closure * \
self._est_factor_dormer * self._est_area_per_floor * \
self._living_area_per_floor

self._top_floor_area = self._est_area_per_roof * \
self._living_area_per_floor

self._est_facade_area =self._est_facade_to_floor_area *\
if self._est_roof_area == 0:
self._est_roof_area = self._top_floor_area

self._est_facade_area = self._est_facade_to_floor_area * \
self._living_area_per_floor + self._est_extra_floor_area

self._est_win_area = self.est_factor_win_area * self.net_leased_area
Expand Down Expand Up @@ -335,7 +338,7 @@ def generate_residential(self):
# East and West
elif value[1] == 90 or value[1] == 270:

self.outer_area[value[1]] = self._est_outer_wall_area /\
self.outer_area[value[1]] = self._est_outer_wall_area / \
self.nr_of_orientation

for zone in self.thermal_zones:
Expand Down
Loading

0 comments on commit 4d5e0cf

Please sign in to comment.