fixed the tcold bug
This commit is contained in:
parent
f3db1e5fee
commit
28dd0f8b0f
|
@ -126,17 +126,18 @@ class InselMonthlyEnergyBalance(Insel):
|
||||||
|
|
||||||
for thermal_boundary in thermal_zone.thermal_boundaries:
|
for thermal_boundary in thermal_zone.thermal_boundaries:
|
||||||
type_code = _CONSTRUCTION_CODE[thermal_boundary.type]
|
type_code = _CONSTRUCTION_CODE[thermal_boundary.type]
|
||||||
window_area = 0
|
wall_area = thermal_boundary.opaque_area * (1 + thermal_boundary.window_ratio)
|
||||||
if thermal_boundary.window_ratio < 1:
|
if thermal_boundary.type == cte.WALL:
|
||||||
window_area = thermal_boundary.opaque_area * thermal_boundary.window_ratio / (1 - thermal_boundary.window_ratio)
|
wall_area = wall_area * (1 - thermal_boundary.parent_surface.percentage_shared)
|
||||||
|
window_area = wall_area * thermal_boundary.window_ratio
|
||||||
|
|
||||||
parameters.append(type_code)
|
parameters.append(type_code)
|
||||||
if thermal_boundary.type != cte.GROUND:
|
if thermal_boundary.type != cte.GROUND:
|
||||||
parameters.append(thermal_boundary.opaque_area + window_area)
|
parameters.append(wall_area)
|
||||||
parameters.append('0.0')
|
parameters.append('0.0')
|
||||||
else:
|
else:
|
||||||
parameters.append('0.0')
|
parameters.append('0.0')
|
||||||
parameters.append(thermal_boundary.opaque_area + window_area)
|
parameters.append(wall_area)
|
||||||
parameters.append(thermal_boundary.u_value)
|
parameters.append(thermal_boundary.u_value)
|
||||||
parameters.append(window_area)
|
parameters.append(window_area)
|
||||||
|
|
||||||
|
|
|
@ -106,11 +106,13 @@ class ComnetUsageParameters:
|
||||||
_domestic_hot_water = DomesticHotWater()
|
_domestic_hot_water = DomesticHotWater()
|
||||||
_domestic_hot_water.density = archetype.domestic_hot_water.density
|
_domestic_hot_water.density = archetype.domestic_hot_water.density
|
||||||
_domestic_hot_water.service_temperature = archetype.domestic_hot_water.service_temperature
|
_domestic_hot_water.service_temperature = archetype.domestic_hot_water.service_temperature
|
||||||
cold_temperature = cold_water_temperature[cte.YEAR]['epw']
|
peak_flow = None
|
||||||
peak_flow = 0
|
if len(cold_water_temperature) > 0:
|
||||||
if (archetype.domestic_hot_water.service_temperature - cold_temperature) > 0:
|
cold_temperature = cold_water_temperature[cte.YEAR]['epw']
|
||||||
peak_flow = archetype.domestic_hot_water.density / cte.WATER_DENSITY / cte.WATER_HEAT_CAPACITY \
|
peak_flow = 0
|
||||||
/ (archetype.domestic_hot_water.service_temperature - cold_temperature)
|
if (archetype.domestic_hot_water.service_temperature - cold_temperature) > 0:
|
||||||
|
peak_flow = archetype.domestic_hot_water.density / cte.WATER_DENSITY / cte.WATER_HEAT_CAPACITY \
|
||||||
|
/ (archetype.domestic_hot_water.service_temperature - cold_temperature)
|
||||||
_domestic_hot_water.peak_flow = peak_flow
|
_domestic_hot_water.peak_flow = peak_flow
|
||||||
_domestic_hot_water.schedules = archetype.domestic_hot_water.schedules
|
_domestic_hot_water.schedules = archetype.domestic_hot_water.schedules
|
||||||
usage.domestic_hot_water = _domestic_hot_water
|
usage.domestic_hot_water = _domestic_hot_water
|
||||||
|
|
|
@ -116,9 +116,12 @@ class NrcanUsageParameters:
|
||||||
_domestic_hot_water = DomesticHotWater()
|
_domestic_hot_water = DomesticHotWater()
|
||||||
_domestic_hot_water.peak_flow = archetype.domestic_hot_water.peak_flow
|
_domestic_hot_water.peak_flow = archetype.domestic_hot_water.peak_flow
|
||||||
_domestic_hot_water.service_temperature = archetype.domestic_hot_water.service_temperature
|
_domestic_hot_water.service_temperature = archetype.domestic_hot_water.service_temperature
|
||||||
cold_temperature = cold_water_temperature[cte.YEAR]['epw']
|
density = None
|
||||||
_domestic_hot_water.density = archetype.domestic_hot_water.peak_flow * cte.WATER_DENSITY * cte.WATER_HEAT_CAPACITY \
|
if len(cold_water_temperature) > 0:
|
||||||
* (archetype.domestic_hot_water.service_temperature - cold_temperature)
|
cold_temperature = cold_water_temperature[cte.YEAR]['epw']
|
||||||
|
density = archetype.domestic_hot_water.peak_flow * cte.WATER_DENSITY * cte.WATER_HEAT_CAPACITY \
|
||||||
|
* (archetype.domestic_hot_water.service_temperature - cold_temperature)
|
||||||
|
_domestic_hot_water.density = density
|
||||||
_domestic_hot_water.schedules = archetype.domestic_hot_water.schedules
|
_domestic_hot_water.schedules = archetype.domestic_hot_water.schedules
|
||||||
usage.domestic_hot_water = _domestic_hot_water
|
usage.domestic_hot_water = _domestic_hot_water
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user