added ground values from epw file
This commit is contained in:
parent
f7df10cd50
commit
12d742ce73
@ -6,10 +6,7 @@ Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
import helpers.constants as cte
|
import hub.helpers.constants as cte
|
||||||
|
|
||||||
AIR_DENSITY = 1.293 # kg/m3
|
|
||||||
AIR_HEAT_CAPACITY = 1005.2 # J/kgK
|
|
||||||
|
|
||||||
|
|
||||||
class LoadsCalculation:
|
class LoadsCalculation:
|
||||||
@ -44,12 +41,12 @@ class LoadsCalculation:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_load_ventilation(thermal_zone, internal_temperature, ambient_temperature):
|
def _get_load_ventilation(thermal_zone, internal_temperature, ambient_temperature):
|
||||||
load_renovation_sensible = 0
|
load_renovation_sensible = 0
|
||||||
for usage in thermal_zone.usage_zones:
|
for usage in thermal_zone.usages:
|
||||||
load_renovation_sensible += AIR_DENSITY * AIR_HEAT_CAPACITY * usage.mechanical_air_change \
|
load_renovation_sensible += cte.AIR_DENSITY * cte.AIR_HEAT_CAPACITY * usage.mechanical_air_change \
|
||||||
* thermal_zone.volume / cte.HOUR_TO_MINUTES / cte.MINUTES_TO_SECONDS \
|
* thermal_zone.volume / cte.HOUR_TO_MINUTES / cte.MINUTES_TO_SECONDS \
|
||||||
* (internal_temperature - ambient_temperature)
|
* (internal_temperature - ambient_temperature)
|
||||||
|
|
||||||
load_infiltration_sensible = AIR_DENSITY * AIR_HEAT_CAPACITY * float(thermal_zone.infiltration_rate_system_off) \
|
load_infiltration_sensible = cte.AIR_DENSITY * cte.AIR_HEAT_CAPACITY * thermal_zone.infiltration_rate_system_off \
|
||||||
* thermal_zone.volume / cte.HOUR_TO_MINUTES / cte.MINUTES_TO_SECONDS \
|
* thermal_zone.volume / cte.HOUR_TO_MINUTES / cte.MINUTES_TO_SECONDS \
|
||||||
* (internal_temperature - ambient_temperature)
|
* (internal_temperature - ambient_temperature)
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
|||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import helpers.constants as cte
|
import hub.helpers.constants as cte
|
||||||
from loads_calculation import LoadsCalculation
|
from loads_calculation import LoadsCalculation
|
||||||
|
|
||||||
|
|
||||||
@ -47,13 +47,12 @@ class PeakLoads:
|
|||||||
def _workflow(self):
|
def _workflow(self):
|
||||||
for building in self._city.buildings:
|
for building in self._city.buildings:
|
||||||
ambient_temperature = building.external_temperature[cte.HOUR][self._weather_format]
|
ambient_temperature = building.external_temperature[cte.HOUR][self._weather_format]
|
||||||
ground_temperature = 0
|
ground_temperature = building.ground_temperature[cte.YEAR]['2'][0]
|
||||||
heating_ambient_temperature = 100
|
heating_ambient_temperature = 100
|
||||||
cooling_ambient_temperature = -100
|
cooling_ambient_temperature = -100
|
||||||
heating_calculation_hour = -1
|
heating_calculation_hour = -1
|
||||||
cooling_calculation_hour = -1
|
cooling_calculation_hour = -1
|
||||||
for hour, temperature in enumerate(ambient_temperature):
|
for hour, temperature in enumerate(ambient_temperature):
|
||||||
ground_temperature += temperature / 8760
|
|
||||||
if temperature < heating_ambient_temperature:
|
if temperature < heating_ambient_temperature:
|
||||||
heating_ambient_temperature = temperature
|
heating_ambient_temperature = temperature
|
||||||
heating_calculation_hour = hour
|
heating_calculation_hour = hour
|
||||||
|
@ -8,12 +8,12 @@ Project Coder Pilar Monsalvete Alvarez de Uribarri pilar.monsalvete@concordia.ca
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
import helpers.constants as cte
|
import hub.helpers.constants as cte
|
||||||
from helpers.monthly_values import MonthlyValues
|
from helpers.monthly_values import MonthlyValues
|
||||||
from imports.geometry_factory import GeometryFactory
|
from hub.imports.geometry_factory import GeometryFactory
|
||||||
from imports.construction_factory import ConstructionFactory
|
from hub.imports.construction_factory import ConstructionFactory
|
||||||
from imports.usage_factory import UsageFactory
|
from hub.imports.usage_factory import UsageFactory
|
||||||
from imports.weather_factory import WeatherFactory
|
from hub.imports.weather_factory import WeatherFactory
|
||||||
from peak_loads import PeakLoads
|
from peak_loads import PeakLoads
|
||||||
|
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ class TestPeakLoadsWorkflow(TestCase):
|
|||||||
weather_file = 'CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw'
|
weather_file = 'CAN_PQ_Montreal.Intl.AP.716270_CWEC.epw'
|
||||||
weather_format = 'epw'
|
weather_format = 'epw'
|
||||||
irradiance_format = 'sra'
|
irradiance_format = 'sra'
|
||||||
construction_format = 'nrel'
|
construction_format = 'nrcan'
|
||||||
usage_format = 'comnet'
|
usage_format = 'nrcan'
|
||||||
self._enrich_city(city, weather_file, weather_format, irradiance_format, construction_format, usage_format)
|
self._enrich_city(city, weather_file, weather_format, irradiance_format, construction_format, usage_format)
|
||||||
PeakLoads(city, outputs_path, weather_format, irradiance_format)
|
PeakLoads(city, outputs_path, weather_format, irradiance_format)
|
||||||
|
Loading…
Reference in New Issue
Block a user