Merge remote-tracking branch 'origin/retrofit_project' into retrofit_project

This commit is contained in:
Guille Gutierrez 2023-06-05 11:53:54 -04:00
commit 1819541a21
3 changed files with 28 additions and 28 deletions

View File

@ -10,8 +10,6 @@ import logging
from typing import List, Union, TypeVar from typing import List, Union, TypeVar
import numpy as np import numpy as np
import pandas as pd
import hub.helpers.constants as cte import hub.helpers.constants as cte
from hub.city_model_structure.attributes.polyhedron import Polyhedron from hub.city_model_structure.attributes.polyhedron import Polyhedron
from hub.city_model_structure.building_demand.household import Household from hub.city_model_structure.building_demand.household import Household
@ -731,9 +729,10 @@ class Building(CityObject):
for _key in self.roofs[0].global_irradiance.keys(): for _key in self.roofs[0].global_irradiance.keys():
_results = [0 for _ in range(0, len(self.roofs[0].global_irradiance[_key][cte.SRA]))] _results = [0 for _ in range(0, len(self.roofs[0].global_irradiance[_key][cte.SRA]))]
for surface in self.roofs: for surface in self.roofs:
_results = [x + y * _efficiency * surface.perimeter_area if _key in orientation_losses_factor:
* surface.solar_collectors_area_reduction_factor * z _results = [x + y * _efficiency * surface.perimeter_area
for x, y, z in zip(_results, surface.global_irradiance[_key][cte.SRA], * surface.solar_collectors_area_reduction_factor * z
orientation_losses_factor[cte.MONTH]['south'])] for x, y, z in zip(_results, surface.global_irradiance[_key][cte.SRA],
orientation_losses_factor[_key]['south'])]
self._onsite_electrical_production[_key] = _results self._onsite_electrical_production[_key] = _results
return self._onsite_electrical_production return self._onsite_electrical_production

View File

@ -192,29 +192,29 @@
<dissipation_id>3</dissipation_id> <dissipation_id>3</dissipation_id>
</equipments> </equipments>
</system> </system>
<system id="8"> <system id="8">
<name>Multi-zone built-up system with baseboard heater hydronic with fuel fired boiler</name> <name>Multi-zone built-up system with baseboard heater hydronic with fuel fired boiler</name>
<demands> <demands>
<demand>heating</demand> <demand>heating</demand>
<demand>domestic_hot_water</demand> <demand>domestic_hot_water</demand>
</demands> </demands>
<equipments> <equipments>
<generation_id>2</generation_id> <generation_id>2</generation_id>
<distribution_id>1</distribution_id> <distribution_id>1</distribution_id>
<dissipation_id>3</dissipation_id> <dissipation_id>3</dissipation_id>
</equipments> </equipments>
</system> </system>
<system id="9"> <system id="9">
<name>Multi-zone built-up system with electrical baseboard heater and electrical hot water</name> <name>Multi-zone built-up system with electrical baseboard heater and electrical hot water</name>
<demands> <demands>
<demand>heating</demand> <demand>heating</demand>
<demand>domestic_hot_water</demand> <demand>domestic_hot_water</demand>
</demands> </demands>
<equipments> <equipments>
<generation_id>2</generation_id> <generation_id>2</generation_id>
<distribution_id>1</distribution_id> <distribution_id>1</distribution_id>
<dissipation_id>3</dissipation_id> <dissipation_id>3</dissipation_id>
</equipments> </equipments>
</system> </system>
<system id="10"> <system id="10">
<name>Unitary air conditioner air cooled DX with external condenser</name> <name>Unitary air conditioner air cooled DX with external condenser</name>

View File

@ -112,3 +112,4 @@ class TestSystemsFactory(TestCase):
self.assertLess(0, building.cooling_consumption[cte.YEAR][0]) self.assertLess(0, building.cooling_consumption[cte.YEAR][0])
self.assertLess(0, building.domestic_hot_water_consumption[cte.YEAR][0]) self.assertLess(0, building.domestic_hot_water_consumption[cte.YEAR][0])
self.assertLess(0, building.onsite_electrical_production[cte.YEAR][0]) self.assertLess(0, building.onsite_electrical_production[cte.YEAR][0])
print(building.heating_consumption[cte.YEAR][0], building.cooling_consumption[cte.YEAR][0], building.domestic_hot_water_consumption[cte.YEAR][0], building.onsite_electrical_production[cte.YEAR][0])