small bug found
This commit is contained in:
parent
c1f2ff5c4b
commit
87d95a14e6
|
@ -9,6 +9,7 @@ Code contributors: Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concord
|
|||
import uuid
|
||||
from typing import List, Union, TypeVar
|
||||
from helpers.configuration_helper import ConfigurationHelper as ch
|
||||
import helpers.constants as cte
|
||||
from city_model_structure.building_demand.layer import Layer
|
||||
from city_model_structure.building_demand.thermal_opening import ThermalOpening
|
||||
from city_model_structure.building_demand.thermal_zone import ThermalZone
|
||||
|
@ -213,7 +214,10 @@ class ThermalBoundary:
|
|||
if self._u_value is None:
|
||||
h_i = self.hi
|
||||
h_e = self.he
|
||||
r_value = 1.0/h_i + 1.0/h_e
|
||||
if self.type == cte.GROUND:
|
||||
r_value = 1.0 / h_i
|
||||
else:
|
||||
r_value = 1.0/h_i + 1.0/h_e
|
||||
try:
|
||||
for layer in self.layers:
|
||||
if layer.material.no_mass:
|
||||
|
|
|
@ -52,26 +52,26 @@ class ThermalZone:
|
|||
self._appliances = None
|
||||
self._internal_gains = None
|
||||
self._thermal_control = None
|
||||
self._usage_zones = None
|
||||
self._usages = None
|
||||
|
||||
@property
|
||||
def usage_zones(self):
|
||||
# example 70-office_30-residential
|
||||
if self._usage_from_parent:
|
||||
self._usage_zones = copy.deepcopy(self._parent_internal_zone.usage_zones)
|
||||
self._usages = copy.deepcopy(self._parent_internal_zone.usage_zones)
|
||||
else:
|
||||
values = self._usage.split('_')
|
||||
usages = []
|
||||
for value in values:
|
||||
usages.append(value.split('-'))
|
||||
self._usage_zones = []
|
||||
for parent_usage_zone in self._parent_internal_zone.usage_zones:
|
||||
self._usages = []
|
||||
for parent_usage in self._parent_internal_zone.usage_zones:
|
||||
for value in usages:
|
||||
if parent_usage_zone.usage == value[1]:
|
||||
new_usage_zone = copy.deepcopy(parent_usage_zone)
|
||||
new_usage_zone.percentage = float(value[0])/100
|
||||
self._usage_zones.append(new_usage_zone)
|
||||
return self._usage_zones
|
||||
if parent_usage.usage == value[1]:
|
||||
new_usage = copy.deepcopy(parent_usage)
|
||||
new_usage.percentage = float(value[0])/100
|
||||
self._usages.append(new_usage)
|
||||
return self._usages
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
|
@ -102,7 +102,7 @@ class ThermalZone:
|
|||
@property
|
||||
def additional_thermal_bridge_u_value(self) -> Union[None, float]:
|
||||
"""
|
||||
Get thermal zone additional thermal bridge u value W/m2K
|
||||
Get thermal zone additional thermal bridge u value per footprint area W/m2K
|
||||
:return: None or float
|
||||
"""
|
||||
return self._additional_thermal_bridge_u_value
|
||||
|
@ -110,7 +110,7 @@ class ThermalZone:
|
|||
@additional_thermal_bridge_u_value.setter
|
||||
def additional_thermal_bridge_u_value(self, value):
|
||||
"""
|
||||
Set thermal zone additional thermal bridge u value W/m2K
|
||||
Set thermal zone additional thermal bridge u value per footprint area W/m2K
|
||||
:param value: float
|
||||
"""
|
||||
if value is not None:
|
||||
|
|
Loading…
Reference in New Issue
Block a user