Incorporation of ventilation. Working.
This commit is contained in:
parent
0747b61294
commit
7b245a69b3
File diff suppressed because it is too large
Load Diff
|
@ -150,7 +150,6 @@ class Idf:
|
|||
Solar_Absorptance=layer.material.solar_absorptance,
|
||||
Visible_Absorptance=layer.material.visible_absorptance
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def _create_infiltration_schedules(thermal_zone):
|
||||
_infiltration_schedules = []
|
||||
|
@ -177,6 +176,21 @@ class Idf:
|
|||
_infiltration_schedules.append(_schedule)
|
||||
return _infiltration_schedules
|
||||
|
||||
@staticmethod
|
||||
def _create_ventilation_schedules(thermal_zone):
|
||||
_ventilation_schedules = []
|
||||
if thermal_zone.thermal_control is None:
|
||||
return []
|
||||
for hvac_availability_schedule in thermal_zone.thermal_control.hvac_availability_schedules:
|
||||
_schedule = Schedule()
|
||||
_schedule.type = cte.VENTILATION
|
||||
_schedule.data_type = cte.FRACTION
|
||||
_schedule.time_step = cte.HOUR
|
||||
_schedule.time_range = cte.DAY
|
||||
_schedule.day_types = copy.deepcopy(hvac_availability_schedule.day_types)
|
||||
_ventilation_schedules = thermal_zone.thermal_control.hvac_availability_schedules
|
||||
return _ventilation_schedules
|
||||
|
||||
@staticmethod
|
||||
def _create_yearly_values_schedules(schedule_type, values):
|
||||
_schedule = Schedule()
|
||||
|
@ -425,19 +439,19 @@ class Idf:
|
|||
)
|
||||
|
||||
def _add_ventilation(self, thermal_zone, zone_name):
|
||||
# for zone in self._idf.idfobjects["ZONE"]:
|
||||
# if zone.Name == f'{zone_name}_infiltration':
|
||||
# return
|
||||
for zone in self._idf.idfobjects["ZONE"]:
|
||||
if zone.Name == f'{zone_name}_ventilation':
|
||||
return
|
||||
schedule = f'Ventilation schedules {thermal_zone.usage_name}'
|
||||
# if schedule not in self._idf.idfobjects[self._HOURLY_SCHEDULE]:
|
||||
# return
|
||||
if schedule not in self._idf.idfobjects[self._HOURLY_SCHEDULE]:
|
||||
return
|
||||
# todo: revise ventilation with Pilar
|
||||
self._idf.newidfobject(self._VENTILATION,
|
||||
Name=f'{zone_name}_ventilation',
|
||||
Zone_or_ZoneList_Name=zone_name,
|
||||
Schedule_Name=schedule,
|
||||
Design_Flow_Rate_Calculation_Method='Flow/Zone',
|
||||
Flow_Rate_per_Zone_Floor_Area=thermal_zone.infiltration_rate_system_off
|
||||
Design_Flow_Rate_Calculation_Method='AirChanges/Hour',
|
||||
Flow_Rate_per_Zone_Floor_Area=thermal_zone.mechanical_air_change
|
||||
)
|
||||
|
||||
def _add_dhw(self, thermal_zone, zone_name):
|
||||
|
@ -496,6 +510,8 @@ class Idf:
|
|||
if building.name in self._target_buildings or building.name in self._adjacent_buildings:
|
||||
_new_schedules = self._create_infiltration_schedules(thermal_zone)
|
||||
self._add_schedules(usage, 'Infiltration', _new_schedules)
|
||||
_new_schedules2 = self._create_ventilation_schedules(thermal_zone)
|
||||
self._add_schedules(usage, 'Ventilation', _new_schedules2)
|
||||
self._add_schedules(usage, 'Occupancy', thermal_zone.occupancy.occupancy_schedules)
|
||||
self._add_schedules(usage, 'HVAC AVAIL', thermal_zone.thermal_control.hvac_availability_schedules)
|
||||
self._add_schedules(usage, 'Heating thermostat', thermal_zone.thermal_control.heating_set_point_schedules)
|
||||
|
|
|
@ -158,6 +158,7 @@ OCCUPANCY = 'Occupancy'
|
|||
APPLIANCES = 'Appliances'
|
||||
HVAC_AVAILABILITY = 'HVAC Avail'
|
||||
INFILTRATION = 'Infiltration'
|
||||
VENTILATION = 'Ventilation'
|
||||
COOLING_SET_POINT = 'ClgSetPt'
|
||||
HEATING_SET_POINT = 'HtgSetPt'
|
||||
EQUIPMENT = 'Equipment'
|
||||
|
|
Loading…
Reference in New Issue
Block a user