Compare commits
6 Commits
main
...
infiltrati
Author | SHA1 | Date | |
---|---|---|---|
2be27590d3 | |||
2d0fd3eb0c | |||
616ae8701d | |||
da44a3d5b2 | |||
7aaab1d8c5 | |||
b34afa06aa |
|
@ -113,6 +113,7 @@ class NrcanCatalog(Catalog):
|
||||||
def _load_archetypes(self):
|
def _load_archetypes(self):
|
||||||
_catalog_archetypes = []
|
_catalog_archetypes = []
|
||||||
archetypes = self._archetypes['archetypes']
|
archetypes = self._archetypes['archetypes']
|
||||||
|
|
||||||
for archetype in archetypes:
|
for archetype in archetypes:
|
||||||
archetype_id = f'{archetype["function"]}_{archetype["period_of_construction"]}_{archetype["climate_zone"]}'
|
archetype_id = f'{archetype["function"]}_{archetype["period_of_construction"]}_{archetype["climate_zone"]}'
|
||||||
function = archetype['function']
|
function = archetype['function']
|
||||||
|
@ -128,6 +129,12 @@ class NrcanCatalog(Catalog):
|
||||||
infiltration_rate_for_ventilation_system_on = (
|
infiltration_rate_for_ventilation_system_on = (
|
||||||
archetype['infiltration_rate_for_ventilation_system_on'] / cte.HOUR_TO_SECONDS
|
archetype['infiltration_rate_for_ventilation_system_on'] / cte.HOUR_TO_SECONDS
|
||||||
)
|
)
|
||||||
|
infiltration_rate_area_for_ventilation_system_on = (
|
||||||
|
archetype['infiltration_rate_area_for_ventilation_system_on']
|
||||||
|
)
|
||||||
|
infiltration_rate_area_for_ventilation_system_off = (
|
||||||
|
archetype['infiltration_rate_area_for_ventilation_system_off']
|
||||||
|
)
|
||||||
|
|
||||||
archetype_constructions = []
|
archetype_constructions = []
|
||||||
for archetype_construction in archetype['constructions']:
|
for archetype_construction in archetype['constructions']:
|
||||||
|
@ -165,7 +172,10 @@ class NrcanCatalog(Catalog):
|
||||||
extra_loses_due_to_thermal_bridges,
|
extra_loses_due_to_thermal_bridges,
|
||||||
None,
|
None,
|
||||||
infiltration_rate_for_ventilation_system_off,
|
infiltration_rate_for_ventilation_system_off,
|
||||||
infiltration_rate_for_ventilation_system_on))
|
infiltration_rate_for_ventilation_system_on,
|
||||||
|
infiltration_rate_area_for_ventilation_system_off,
|
||||||
|
infiltration_rate_area_for_ventilation_system_on
|
||||||
|
))
|
||||||
return _catalog_archetypes
|
return _catalog_archetypes
|
||||||
|
|
||||||
def names(self, category=None):
|
def names(self, category=None):
|
||||||
|
|
|
@ -23,7 +23,9 @@ class Archetype:
|
||||||
extra_loses_due_to_thermal_bridges,
|
extra_loses_due_to_thermal_bridges,
|
||||||
indirect_heated_ratio,
|
indirect_heated_ratio,
|
||||||
infiltration_rate_for_ventilation_system_off,
|
infiltration_rate_for_ventilation_system_off,
|
||||||
infiltration_rate_for_ventilation_system_on):
|
infiltration_rate_for_ventilation_system_on,
|
||||||
|
infiltration_rate_area_for_ventilation_system_off = 0,
|
||||||
|
infiltration_rate_area_for_ventilation_system_on = 0):
|
||||||
self._id = archetype_id
|
self._id = archetype_id
|
||||||
self._name = name
|
self._name = name
|
||||||
self._function = function
|
self._function = function
|
||||||
|
@ -36,6 +38,8 @@ class Archetype:
|
||||||
self._indirect_heated_ratio = indirect_heated_ratio
|
self._indirect_heated_ratio = indirect_heated_ratio
|
||||||
self._infiltration_rate_for_ventilation_system_off = infiltration_rate_for_ventilation_system_off
|
self._infiltration_rate_for_ventilation_system_off = infiltration_rate_for_ventilation_system_off
|
||||||
self._infiltration_rate_for_ventilation_system_on = infiltration_rate_for_ventilation_system_on
|
self._infiltration_rate_for_ventilation_system_on = infiltration_rate_for_ventilation_system_on
|
||||||
|
self._infiltration_rate_area_for_ventilation_system_off = infiltration_rate_area_for_ventilation_system_off
|
||||||
|
self._infiltration_rate_area_for_ventilation_system_on = infiltration_rate_area_for_ventilation_system_on
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def id(self):
|
def id(self):
|
||||||
|
@ -133,6 +137,23 @@ class Archetype:
|
||||||
"""
|
"""
|
||||||
return self._infiltration_rate_for_ventilation_system_on
|
return self._infiltration_rate_for_ventilation_system_on
|
||||||
|
|
||||||
|
@property
|
||||||
|
def infiltration_rate_area_for_ventilation_system_off(self):
|
||||||
|
"""
|
||||||
|
Get archetype infiltration rate area for ventilation system off
|
||||||
|
:return: float
|
||||||
|
"""
|
||||||
|
return self._infiltration_rate_area_for_ventilation_system_off
|
||||||
|
|
||||||
|
@property
|
||||||
|
def infiltration_rate_area_for_ventilation_system_on(self):
|
||||||
|
"""
|
||||||
|
Get archetype infiltration rate area for ventilation system on
|
||||||
|
:return: float
|
||||||
|
"""
|
||||||
|
return self._infiltration_rate_area_for_ventilation_system_on
|
||||||
|
|
||||||
|
|
||||||
def to_dictionary(self):
|
def to_dictionary(self):
|
||||||
"""Class content to dictionary"""
|
"""Class content to dictionary"""
|
||||||
_constructions = []
|
_constructions = []
|
||||||
|
@ -149,6 +170,8 @@ class Archetype:
|
||||||
'indirect heated ratio': self.indirect_heated_ratio,
|
'indirect heated ratio': self.indirect_heated_ratio,
|
||||||
'infiltration rate for ventilation off [1/s]': self.infiltration_rate_for_ventilation_system_off,
|
'infiltration rate for ventilation off [1/s]': self.infiltration_rate_for_ventilation_system_off,
|
||||||
'infiltration rate for ventilation on [1/s]': self.infiltration_rate_for_ventilation_system_on,
|
'infiltration rate for ventilation on [1/s]': self.infiltration_rate_for_ventilation_system_on,
|
||||||
|
'infiltration rate area for ventilation off': self.infiltration_rate_area_for_ventilation_system_off,
|
||||||
|
'infiltration rate area for ventilation on': self.infiltration_rate_area_for_ventilation_system_on,
|
||||||
'constructions': _constructions
|
'constructions': _constructions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,8 @@ class ThermalArchetype:
|
||||||
self._indirect_heated_ratio = None
|
self._indirect_heated_ratio = None
|
||||||
self._infiltration_rate_for_ventilation_system_off = None
|
self._infiltration_rate_for_ventilation_system_off = None
|
||||||
self._infiltration_rate_for_ventilation_system_on = None
|
self._infiltration_rate_for_ventilation_system_on = None
|
||||||
|
self._infiltration_rate_area_for_ventilation_system_off = 0
|
||||||
|
self._infiltration_rate_area_for_ventilation_system_on = 0
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def constructions(self) -> [Construction]:
|
def constructions(self) -> [Construction]:
|
||||||
|
@ -132,3 +134,35 @@ class ThermalArchetype:
|
||||||
:param value: float
|
:param value: float
|
||||||
"""
|
"""
|
||||||
self._infiltration_rate_for_ventilation_system_on = value
|
self._infiltration_rate_for_ventilation_system_on = value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def infiltration_rate_area_for_ventilation_system_off(self):
|
||||||
|
"""
|
||||||
|
Get infiltration rate for ventilation system off in ACH
|
||||||
|
:return: float
|
||||||
|
"""
|
||||||
|
return self._infiltration_rate_area_for_ventilation_system_off
|
||||||
|
|
||||||
|
@infiltration_rate_area_for_ventilation_system_off.setter
|
||||||
|
def infiltration_rate_area_for_ventilation_system_off(self, value):
|
||||||
|
"""
|
||||||
|
Set infiltration rate for ventilation system off in ACH
|
||||||
|
:param value: float
|
||||||
|
"""
|
||||||
|
self._infiltration_rate_area_for_ventilation_system_off = value
|
||||||
|
|
||||||
|
@property
|
||||||
|
def infiltration_rate_area_for_ventilation_system_on(self):
|
||||||
|
"""
|
||||||
|
Get infiltration rate for ventilation system on in ACH
|
||||||
|
:return: float
|
||||||
|
"""
|
||||||
|
return self._infiltration_rate_area_for_ventilation_system_on
|
||||||
|
|
||||||
|
@infiltration_rate_area_for_ventilation_system_on.setter
|
||||||
|
def infiltration_rate_area_for_ventilation_system_on(self, value):
|
||||||
|
"""
|
||||||
|
Set infiltration rate for ventilation system on in ACH
|
||||||
|
:param value: float
|
||||||
|
"""
|
||||||
|
self._infiltration_rate_area_for_ventilation_system_on = value
|
||||||
|
|
|
@ -44,6 +44,8 @@ class ThermalZone:
|
||||||
self._indirectly_heated_area_ratio = None
|
self._indirectly_heated_area_ratio = None
|
||||||
self._infiltration_rate_system_on = None
|
self._infiltration_rate_system_on = None
|
||||||
self._infiltration_rate_system_off = None
|
self._infiltration_rate_system_off = None
|
||||||
|
self._infiltration_rate_area_system_on = None
|
||||||
|
self._infiltration_rate_area_system_off = None
|
||||||
self._volume = volume
|
self._volume = volume
|
||||||
self._ordinate_number = None
|
self._ordinate_number = None
|
||||||
self._view_factors_matrix = None
|
self._view_factors_matrix = None
|
||||||
|
@ -166,6 +168,24 @@ class ThermalZone:
|
||||||
self._infiltration_rate_system_off = self._parent_internal_zone.thermal_archetype.infiltration_rate_for_ventilation_system_off
|
self._infiltration_rate_system_off = self._parent_internal_zone.thermal_archetype.infiltration_rate_for_ventilation_system_off
|
||||||
return self._infiltration_rate_system_off
|
return self._infiltration_rate_system_off
|
||||||
|
|
||||||
|
@property
|
||||||
|
def infiltration_rate_area_system_on(self):
|
||||||
|
"""
|
||||||
|
Get thermal zone infiltration rate system on in air changes per second (1/s)
|
||||||
|
:return: None or float
|
||||||
|
"""
|
||||||
|
self._infiltration_rate_system_on = self._parent_internal_zone.thermal_archetype.infiltration_rate_area_for_ventilation_system_on
|
||||||
|
return self._infiltration_rate_system_on
|
||||||
|
|
||||||
|
@property
|
||||||
|
def infiltration_rate_area_system_off(self):
|
||||||
|
"""
|
||||||
|
Get thermal zone infiltration rate system off in air changes per second (1/s)
|
||||||
|
:return: None or float
|
||||||
|
"""
|
||||||
|
self._infiltration_rate_system_off = self._parent_internal_zone.thermal_archetype.infiltration_rate_area_for_ventilation_system_off
|
||||||
|
return self._infiltration_rate_system_off
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def volume(self):
|
def volume(self):
|
||||||
"""
|
"""
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -655,6 +655,19 @@ class Idf:
|
||||||
Variable_Name="Water Use Equipment Heating Rate",
|
Variable_Name="Water Use Equipment Heating Rate",
|
||||||
Reporting_Frequency="Hourly",
|
Reporting_Frequency="Hourly",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self._idf.newidfobject(
|
||||||
|
"OUTPUT:VARIABLE",
|
||||||
|
Variable_Name="Zone Lights Electricity Rate",
|
||||||
|
Reporting_Frequency="Hourly",
|
||||||
|
)
|
||||||
|
|
||||||
|
self._idf.newidfobject(
|
||||||
|
"OUTPUT:VARIABLE",
|
||||||
|
Variable_Name="Other Equipment Electricity Rate",
|
||||||
|
Reporting_Frequency="Hourly",
|
||||||
|
)
|
||||||
|
|
||||||
# post-process to erase windows associated to adiabatic walls
|
# post-process to erase windows associated to adiabatic walls
|
||||||
windows_list = []
|
windows_list = []
|
||||||
for window in self._idf.idfobjects[self._WINDOW]:
|
for window in self._idf.idfobjects[self._WINDOW]:
|
||||||
|
|
|
@ -127,25 +127,26 @@
|
||||||
No, !- Do HVAC Sizing Simulation for Sizing Periods
|
No, !- Do HVAC Sizing Simulation for Sizing Periods
|
||||||
1; !- Maximum Number of HVAC Sizing Simulation Passes
|
1; !- Maximum Number of HVAC Sizing Simulation Passes
|
||||||
|
|
||||||
Output:VariableDictionary,Regular;
|
Output:Table:SummaryReports, AnnualBuildingUtilityPerformanceSummary,
|
||||||
|
DemandEndUseComponentsSummary,
|
||||||
|
SensibleHeatGainSummary,
|
||||||
|
InputVerificationandResultsSummary,
|
||||||
|
AdaptiveComfortSummary,
|
||||||
|
Standard62.1Summary,
|
||||||
|
ClimaticDataSummary,
|
||||||
|
EquipmentSummary,
|
||||||
|
EnvelopeSummary,
|
||||||
|
LightingSummary,
|
||||||
|
HVACSizingSummary,
|
||||||
|
SystemSummary,
|
||||||
|
ComponentSizingSummary,
|
||||||
|
OutdoorAirSummary,
|
||||||
|
ObjectCountSummary,
|
||||||
|
EndUseEnergyConsumptionOtherFuelsMonthly,
|
||||||
|
PeakEnergyEndUseOtherFuelsMonthly;
|
||||||
|
|
||||||
Output:Variable,*,Site Outdoor Air Drybulb Temperature,Timestep;
|
|
||||||
|
|
||||||
Output:Variable,*,Site Outdoor Air Wetbulb Temperature,Timestep;
|
OutputControl:Table:Style, CommaAndHTML,JtoKWH;
|
||||||
|
|
||||||
Output:Variable,*,Site Outdoor Air Dewpoint Temperature,Timestep;
|
|
||||||
|
|
||||||
Output:Variable,*,Site Solar Azimuth Angle,Timestep;
|
|
||||||
|
|
||||||
Output:Variable,*,Site Solar Altitude Angle,Timestep;
|
|
||||||
|
|
||||||
Output:Variable,*,Site Direct Solar Radiation Rate per Area,Timestep;
|
|
||||||
|
|
||||||
Output:Variable,*,Site Diffuse Solar Radiation Rate per Area,Timestep;
|
|
||||||
|
|
||||||
OutputControl:Table:Style,
|
|
||||||
HTML; !- Column Separator
|
|
||||||
|
|
||||||
Output:Table:SummaryReports,
|
|
||||||
AllSummary; !- Report 1 Name
|
|
||||||
|
|
||||||
|
OutputControl:IlluminanceMap:Style,
|
||||||
|
Comma; !- Column separator
|
||||||
|
|
|
@ -168,18 +168,60 @@ class InselMonthlyEnergyBalance:
|
||||||
parameters.append(f'{usage.hours_day} % BP(16) #6 Usage hours per day zone {i + 1}')
|
parameters.append(f'{usage.hours_day} % BP(16) #6 Usage hours per day zone {i + 1}')
|
||||||
parameters.append(f'{usage.days_year} % BP(17) #7 Usage days per year zone {i + 1}')
|
parameters.append(f'{usage.days_year} % BP(17) #7 Usage days per year zone {i + 1}')
|
||||||
|
|
||||||
|
# Changed location to have the value of wall area
|
||||||
|
|
||||||
|
for thermal_boundary in thermal_zone.thermal_boundaries:
|
||||||
|
type_code = _CONSTRUCTION_CODE[thermal_boundary.type]
|
||||||
|
wall_area = thermal_boundary.opaque_area * (1 + thermal_boundary.window_ratio)
|
||||||
|
if thermal_boundary.type == cte.WALL:
|
||||||
|
if thermal_boundary.parent_surface.percentage_shared is not None:
|
||||||
|
wall_area = wall_area * (1 - thermal_boundary.parent_surface.percentage_shared)
|
||||||
|
window_area = wall_area * thermal_boundary.window_ratio
|
||||||
|
|
||||||
|
parameters.append(type_code)
|
||||||
|
if thermal_boundary.type != cte.GROUND:
|
||||||
|
parameters.append(wall_area)
|
||||||
|
parameters.append('0.0')
|
||||||
|
else:
|
||||||
|
parameters.append('0.0')
|
||||||
|
parameters.append(wall_area)
|
||||||
|
parameters.append(thermal_boundary.u_value)
|
||||||
|
parameters.append(window_area)
|
||||||
|
|
||||||
|
if window_area <= 0.001:
|
||||||
|
parameters.append(0.0)
|
||||||
|
parameters.append(0.0)
|
||||||
|
parameters.append(0.0)
|
||||||
|
else:
|
||||||
|
thermal_opening = thermal_boundary.thermal_openings[0]
|
||||||
|
parameters.append(thermal_opening.frame_ratio)
|
||||||
|
parameters.append(thermal_opening.overall_u_value)
|
||||||
|
parameters.append(thermal_opening.g_value)
|
||||||
|
if thermal_boundary.type is not cte.GROUND:
|
||||||
|
parameters.append(thermal_boundary.external_surface.short_wave_reflectance)
|
||||||
|
else:
|
||||||
|
parameters.append(0.0)
|
||||||
|
|
||||||
|
# Changed location to have the value of wall area
|
||||||
|
|
||||||
ventilation = 0
|
ventilation = 0
|
||||||
infiltration = 0
|
infiltration = 0
|
||||||
for schedule in usage.thermal_control.hvac_availability_schedules:
|
for schedule in usage.thermal_control.hvac_availability_schedules:
|
||||||
ventilation_day = 0
|
ventilation_day = 0
|
||||||
infiltration_day = 0
|
infiltration_day = 0
|
||||||
|
new_infiltration = (internal_zone.thermal_zones_from_internal_zones[0].infiltration_rate_area_system_off * \
|
||||||
|
wall_area * 0.15) / (internal_zone.thermal_zones_from_internal_zones[0].total_floor_area *
|
||||||
|
building.average_storey_height)
|
||||||
for value in schedule.values:
|
for value in schedule.values:
|
||||||
if value == 0:
|
if value == 0:
|
||||||
infiltration_day += internal_zone.thermal_zones_from_internal_zones[0].infiltration_rate_system_off / 24 * cte.HOUR_TO_SECONDS
|
#infiltration_day += internal_zone.thermal_zones_from_internal_zones[0].infiltration_rate_system_off / 24 * cte.HOUR_TO_SECONDS
|
||||||
|
infiltration_day = new_infiltration/ 24
|
||||||
ventilation_day += 0
|
ventilation_day += 0
|
||||||
else:
|
else:
|
||||||
ventilation_value = usage.mechanical_air_change * value * cte.HOUR_TO_SECONDS
|
ventilation_value = usage.mechanical_air_change * value * cte.HOUR_TO_SECONDS
|
||||||
infiltration_value = internal_zone.thermal_zones_from_internal_zones[0].infiltration_rate_system_off * value * cte.HOUR_TO_SECONDS
|
#todo: changefactor from 0.15 to (4/50)^0.65, change of units from 50 Pa to 4 Pa.
|
||||||
|
infiltration_value = new_infiltration
|
||||||
|
#infiltration_value = internal_zone.thermal_zones_from_internal_zones[0].infiltration_rate_system_off * value * cte.HOUR_TO_SECONDS
|
||||||
if ventilation_value >= infiltration_value:
|
if ventilation_value >= infiltration_value:
|
||||||
ventilation_day += ventilation_value / 24
|
ventilation_day += ventilation_value / 24
|
||||||
infiltration_day += 0
|
infiltration_day += 0
|
||||||
|
|
|
@ -58,7 +58,8 @@ class ConstructionHelper:
|
||||||
'Boucherville': '6',
|
'Boucherville': '6',
|
||||||
'Mascouche': '6',
|
'Mascouche': '6',
|
||||||
'Saint-Leonard': '6',
|
'Saint-Leonard': '6',
|
||||||
'La Prairie': '6'
|
'La Prairie': '6',
|
||||||
|
'Summerland': '6'
|
||||||
}
|
}
|
||||||
|
|
||||||
_reference_city_to_israel_climate_zone = {
|
_reference_city_to_israel_climate_zone = {
|
||||||
|
|
|
@ -67,6 +67,8 @@ class NrcanPhysicsParameters:
|
||||||
thermal_archetype.indirect_heated_ratio = 0
|
thermal_archetype.indirect_heated_ratio = 0
|
||||||
thermal_archetype.infiltration_rate_for_ventilation_system_on = catalog_archetype.infiltration_rate_for_ventilation_system_on
|
thermal_archetype.infiltration_rate_for_ventilation_system_on = catalog_archetype.infiltration_rate_for_ventilation_system_on
|
||||||
thermal_archetype.infiltration_rate_for_ventilation_system_off = catalog_archetype.infiltration_rate_for_ventilation_system_off
|
thermal_archetype.infiltration_rate_for_ventilation_system_off = catalog_archetype.infiltration_rate_for_ventilation_system_off
|
||||||
|
thermal_archetype.infiltration_rate_area_for_ventilation_system_on = catalog_archetype.infiltration_rate_area_for_ventilation_system_on
|
||||||
|
thermal_archetype.infiltration_rate_area_for_ventilation_system_off = catalog_archetype.infiltration_rate_area_for_ventilation_system_off
|
||||||
_constructions = []
|
_constructions = []
|
||||||
for catalog_construction in catalog_archetype.constructions:
|
for catalog_construction in catalog_archetype.constructions:
|
||||||
construction = Construction()
|
construction = Construction()
|
||||||
|
|
|
@ -69,6 +69,7 @@ class TestExports(TestCase):
|
||||||
"""
|
"""
|
||||||
city = self._get_citygml('one_building_in_kelowna.gml')
|
city = self._get_citygml('one_building_in_kelowna.gml')
|
||||||
WeatherFactory('epw', city).enrich()
|
WeatherFactory('epw', city).enrich()
|
||||||
|
ConstructionFactory('nrcan', city).enrich()
|
||||||
for building in city.buildings:
|
for building in city.buildings:
|
||||||
building.external_temperature[cte.MONTH] = MonthlyValues().\
|
building.external_temperature[cte.MONTH] = MonthlyValues().\
|
||||||
get_mean_values(building.external_temperature[cte.HOUR])
|
get_mean_values(building.external_temperature[cte.HOUR])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user