Esempio n. 1
0
def is_mechanical_ventilation_heat_recovery_active(bpr, tsd, t):
    """
    Control of activity of heat exchanger of mechanical ventilation system
    
    Author: Gabriel Happle
    Date: APR 2017
    
    :param bpr: Building Properties
    :type bpr: BuildingPropertiesRow
    :param tsd: Time series data of building
    :type tsd: dict
    :param t: time step / hour of the year
    :type t: int
    :return: Heat exchanger ON/OFF status
    :rtype: bool
    """

    if is_mechanical_ventilation_active(bpr, tsd, t)\
            and has_mechanical_ventilation_heat_recovery(bpr)\
            and control_heating_cooling_systems.is_heating_season(t, bpr):
        if is_night_flushing_active(bpr, tsd, t) or is_economizer_active(
                bpr, tsd, t):
            return False
        else:
            return True

    elif is_mechanical_ventilation_active(bpr, tsd, t)\
            and has_mechanical_ventilation_heat_recovery(bpr)\
            and control_heating_cooling_systems.is_cooling_season(t, bpr)\
            and tsd['T_int'][t-1] < tsd['T_ext'][t]:

        return True

    elif is_mechanical_ventilation_active(bpr, tsd, t) \
            and control_heating_cooling_systems.is_cooling_season(t, bpr) \
            and tsd['T_int'][t-1] >= tsd['T_ext'][t]:

        # heat recovery is deactivated in the cooling case,
        # if outdoor air conditions are colder than indoor (free cooling)

        return False

    else:
        return False
Esempio n. 2
0
def is_mechanical_ventilation_heat_recovery_active(bpr, tsd, t):
    """
    Control of activity of heat exchanger of mechanical ventilation system
    
    Author: Gabriel Happle
    Date: APR 2017
    
    :param bpr: Building Properties
    :type bpr: BuildingPropertiesRow
    :param tsd: Time series data of building
    :type tsd: dict
    :param t: time step / hour of the year
    :type t: int
    :return: Heat exchanger ON/OFF status
    :rtype: bool
    """

    if is_mechanical_ventilation_active(bpr, tsd, t)\
            and has_mechanical_ventilation_heat_recovery(bpr)\
            and control_heating_cooling_systems.is_heating_season(t, bpr):

        # heat recovery is always active if mechanical ventilation is active (no intelligent by pass)
        # this is the usual system configuration according to Clayton Miller
        return True

    elif is_mechanical_ventilation_active(bpr, tsd, t)\
            and has_mechanical_ventilation_heat_recovery(bpr)\
            and control_heating_cooling_systems.is_cooling_season(t, bpr)\
            and tsd['T_int'][t-1] < tsd['T_ext'][t]:

        return True

    elif is_mechanical_ventilation_active(bpr, tsd, t) \
            and control_heating_cooling_systems.is_cooling_season(t, bpr) \
            and tsd['T_int'][t-1] >= tsd['T_ext'][t]:

        # heat recovery is deactivated in the cooling case,
        #  if outdoor air conditions are colder than indoor (free cooling)

        return False

    else:
        return False
Esempio n. 3
0
def calc_heating_cooling_loads(bpr, tsd, t):
    """

    :param bpr:
    :param tsd:
    :param t:
    :return:
    """

    # first check for season
    if control_heating_cooling_systems.is_heating_season(t, bpr)\
            and not control_heating_cooling_systems.is_cooling_season(t, bpr):

        # +++++++++++++++++++++++++++++++++++++++++++
        # HEATING
        # +++++++++++++++++++++++++++++++++++++++++++

        # check system
        if not control_heating_cooling_systems.has_heating_system(bpr) \
                or not control_heating_cooling_systems.heating_system_is_active(tsd, t):

            # no system = no loads
            rc_model_temperatures = calc_rc_no_loads(bpr, tsd, t)

        elif control_heating_cooling_systems.has_radiator_heating_system(bpr)\
                or control_heating_cooling_systems.has_floor_heating_system(bpr):

            # radiator or floor heating
            rc_model_temperatures = calc_heat_loads_radiator(bpr, t, tsd)

            tsd['Ehs_lat_aux'][t] = 0  # TODO

        # elif has_local_ac_heating_system:
        # TODO: here could be a heating system using the mini-split unit ("T5")

        elif control_heating_cooling_systems.has_central_ac_heating_system(
                bpr):

            rc_model_temperatures = calc_heat_loads_central_ac(bpr, t, tsd)

        else:
            # message and no heating system
            warnings.warn(
                'Unknown heating system. Calculation without system.')

            # no system = no loads
            rc_model_temperatures = calc_rc_no_loads(bpr, tsd, t)

        # update tsd
        update_tsd_no_cooling(tsd, t)

        # for dashboard
        detailed_thermal_balance_to_tsd(tsd, bpr, t, rc_model_temperatures)

    elif control_heating_cooling_systems.is_cooling_season(t, bpr) \
            and not control_heating_cooling_systems.is_heating_season(t, bpr):

        # +++++++++++++++++++++++++++++++++++++++++++
        # COOLING
        # +++++++++++++++++++++++++++++++++++++++++++

        # check system
        if not control_heating_cooling_systems.has_cooling_system(bpr)\
                or not control_heating_cooling_systems.cooling_system_is_active(bpr, tsd, t):

            # no system = no loads
            rc_model_temperatures = calc_rc_no_loads(bpr, tsd, t)

        elif control_heating_cooling_systems.has_local_ac_cooling_system(bpr):

            rc_model_temperatures = calc_cool_loads_mini_split_ac(bpr, t, tsd)

        elif control_heating_cooling_systems.has_central_ac_cooling_system(
                bpr):

            rc_model_temperatures = calc_cool_loads_central_ac(bpr, t, tsd)

        elif control_heating_cooling_systems.has_3for2_cooling_system(bpr):

            rc_model_temperatures = calc_cool_loads_3for2(bpr, t, tsd)

        elif control_heating_cooling_systems.has_ceiling_cooling_system(bpr) or \
                control_heating_cooling_systems.has_floor_cooling_system(bpr):

            rc_model_temperatures = calc_cool_loads_radiator(bpr, t, tsd)

        else:
            # message and no cooling system
            warnings.warn(
                'Unknown cooling system. Calculation without system.')

            # no system = no loads
            rc_model_temperatures = calc_rc_no_loads(bpr, tsd, t)

        # update tsd
        update_tsd_no_heating(tsd, t)

        # for dashboard
        detailed_thermal_balance_to_tsd(tsd, bpr, t, rc_model_temperatures)

    else:
        warnings.warn('Timestep %s not in heating season nor cooling season' %
                      t)
        calc_rc_no_loads(bpr, tsd, t)

    return