Esempio n. 1
0
def building_time_constant(**params) -> float:
    """
    Estimate thermal time constant of building or building entity.

    **params**
    -   `c_eff`
         Volume-specific effective thermal storage capacity of the building or building entity;
    -   `V_ext`
        External / gross volume of the building or building entity.
    -   `HT`
         Overall heat transfer coefficient of the considered building without temperature adjustment.
         Only heat losses concerning the building as a whole shall be taken into account:
            + transmission heat loss (both directly or through unheated spaces):
            + to the external (directly and through unheated spaces);
            + to the ground;
            + to adjacent buildings;
            + ventilation heat loss calculated for the entire building
        Note that the conditions assumed when calculating H may differ depending on the period of time H shall be
        calculated for (e.g. different air exchange rates in daily use and weekend setback). Thus, for the same building
        and different situations, different heat transfer coefficients and accordingly different time constants may be
        calculated.
    """
    unpacker = UnPacker(params)
    c_eff: float = unpacker.unpack(
        'c_eff', 'W * hr / (m ** 3 * K)',
        50)  # see EN 12831-1, Annex B.2.7, table B.4
    V_ext: float = unpacker.unpack('V_ext', 'm ** 3')
    HT: float = unpacker.unpack('HT', 'W / K')
    C_eff = c_eff * V_ext
    tau = C_eff / HT
    return tau
Esempio n. 2
0
 def __init__(self, heated_space: 'HeatedSpace', **params):
     """
     **params**
     - `T_adj`
     """
     super().__init__(heated_space, **params)
     unpacker = UnPacker(params)
     self.T_adj = unpacker.unpack('T_adj', 'degC')
     self.f_T = self._calc_temp_adjust_factor()
     self._H = self._calc_heat_transfer_coefficient()
Esempio n. 3
0
 def __init__(self, heated_space: 'HeatedSpace', **params):
     """
     **params**
     - `dU_tb`
     - `f_U`
     """
     super().__init__(heated_space, **params)
     unpacker = UnPacker(params)
     self.dU_tb = unpacker.unpack('dU_tb', 'W / (m ** 2 * K)', 0.1)
     self.f_U = unpacker.unpack('f_U', default_value=1.0)
     self.T_adj = self.T_e_d
     self.f_T = self._calc_temp_adjust_factor()
     self._H = self._calc_heat_transfer_coefficient()
Esempio n. 4
0
 def __init__(self, **params):
     """
     **params**
     -   `T_e_d`
         External design temperature of the reference site; see NBN EN 12831-1 Annex NA.2, table NA.1.
     -   `T_e_an`
         Annual mean external temperature; see NBN EN 12831-1 Annex NA.2, table NA.1.
     -   `T_e_min`
         Average minimum external temperature of the coldest month; see NBN EN 12831-1 Annex NA.2, table NA.1.
     """
     unpacker = UnPacker(params)
     self.T_e_d: float = unpacker.unpack('T_e_d', 'degC')
     self.T_e_an: float = unpacker.unpack('T_e_an', 'degC')
     self.T_e_min: float = unpacker.unpack('T_e_min', 'degC')
Esempio n. 5
0
 def __init__(self, heated_space: 'HeatedSpace', **params):
     """
     **params**
     - `f_dT_an`
     - `f_gw`
     - `A_g`
     - `P`
     - `dU_tb`
     - `z`
     """
     super().__init__(heated_space, **params)
     unpacker = UnPacker(params)
     self.f_dT_an = unpacker.unpack(
         'f_dT_an', default_value=1.45)  # EN 12831-1, Annex B.2.3
     self.f_gw = unpacker.unpack(
         'f_gw', default_value=1.0)  # EN 12831-1, Annex B.2.3
     self.A_g = unpacker.unpack('A_g', 'm ** 2')
     self.P = unpacker.unpack('P', 'm')
     self.B = self._calc_B()
     self.dU_tb = unpacker.unpack('dU_tb', 'W / (m ** 2 * K)', 0.1)
     self.z = unpacker.unpack('z', 'm', 0.0)
     self.U_equiv = self._calc_U_equiv()
     self.T_adj = self.heated_space.T_e_an
     self.f_T = self._calc_temp_adjust_factor()
     self._H = self._calc_heat_transfer_coefficient()
Esempio n. 6
0
    def __init__(self, building_entity: 'BuildingEntity', name: str, **params):
        """
        **params**
        -   `q_env_50`
            Air permeability (alternatively, air change rate) at a pressure difference of 50 Pa (ATDs, if any, closed);
            see EN 12831-1, Annex B.2.10.
        -   `V_ATD_d`
            Design air volume flow of the ATDs in zone. Optional: only required with ATDs; see EN 12831-1, Annex B.2.12.
        -   `dP_ATD_d`
            Design pressure difference of the ATDs in zone. Optional: only required with ATDs; see EN 12831-1,
            Annex B.2.12.
        -   `v_leak`
            Pressure exponent of zone. Optional: only required in zones with ATDs; EN 12831-1, Annex B.2.13.
        -   `f_fac`
            Adjustment factor for the number of exposed facades of the zone. Optional: only required in zones with
            unbalanced ventilation; EN 12831-1, Annex B.2.15, table B.9.
        -   `f_V`
            Volume flow factor of the zone. Optional: not required in naturally ventilated air-tight zones without ATDs;
            see EN 12831-1, Annex B.2.11, table B.8.
        -   `f_dir`
            Adjustment factor for the orientation of the zone; see EN 12831-1, Annex B.2.14
        -   `f_iz`
            Ratio between the minimum air volume flow of the room and the resulting air volume flow of the entire zone;
            see EN 12831-1, Annex B.2.9.
        """
        self.name = name
        self.building_entity: Optional[BuildingEntity] = building_entity
        self.heated_spaces: Dict[str, HeatedSpace] = {}

        # unpack input parameters
        unpacker = UnPacker(params)
        self.q_env_50: float = unpacker.unpack('q_env_50',
                                               'm ** 3 / (m ** 2 * hr)')
        self.V_ATD_d: float = unpacker.unpack(
            'V_ATD_d', 'm ** 3 / hr')  # EN 12831-1, Annex B.2.12
        self.dP_ATD_d: float = unpacker.unpack('dP_ATD_d', 'Pa',
                                               4.0)  # EN 12831-1, Annex B.2.12
        self.v_leak: float = unpacker.unpack(
            'v_leak', default_value=0.67)  # EN 12831-1, Annex B.2.13
        self.f_fac: float = unpacker.unpack(
            'f_fac', default_value=12.0)  # EN 12831-1, Annex B.2.15, table B.9
        self.f_V: float = unpacker.unpack(
            'f_V', default_value=0.05)  # EN 12831-1, Annex B.2.11, table B.8
        self.f_dir: float = unpacker.unpack(
            'f_dir', default_value=2.0)  # EN 12831-1, Annex B.2.14
        self.f_iz: float = unpacker.unpack(
            'f_iz', default_value=0.5)  # see EN 12831-1, Annex B.2.9
Esempio n. 7
0
def mean_internal_surface_temperature(**params) -> float:
    """
    In case of a heated space with a room height of 4 metres or higher, adjust mean internal surface temperature of a
    building element used in the calculation of temperature adjustment factors for transmission heat transfer
    coefficients, taking into account a vertical air temperature gradient and a difference between air and surface
    temperature

    **params**
    -   `T_i_d`
        Internal design temperature of the room.
    -   `gT_a`
        Air temperature gradient of the heat emission system used in the room; see EN 12831-1 B.2.6.
    -   `h`
        Mean height of the considered building element above floor level.
    -   `h_occ`
        Height of the occupied zone in the room (default 1 m cf. EN 12831-1 B.2.6).
    -   `dT_s`
        Correction term to allow for differing air and surface temperatures (e.g. increased floor or wall temperatures
        due to illumination, by radiant heaters, due to floor heating); see EN 12831-1 B.2.6.
    """
    unpacker = UnPacker(params)
    T_i_d: float = unpacker.unpack('T_i_d', 'degC')
    gT_a: float = unpacker.unpack(
        'gT_a', 'K / m', 1.0)  # see EN 12831-1, Annex B.2.6, table B.3
    h: float = unpacker.unpack('h', 'm', 0.0)
    h_occ: float = unpacker.unpack('h_occ', 'm',
                                   1.0)  # see EN 12831-1, Annex B.2.6
    dT_s: float = unpacker.unpack(
        'dT_s', 'K', 0.0)  # see EN 12831-1, Annex B.2.6, table B.3
    T_sm = T_i_d + gT_a * (h - h_occ) + dT_s
    return T_sm
Esempio n. 8
0
def mean_internal_air_temperature(**params) -> float:
    """
    Adjust internal design temperature in the calculation of ventilation heat loss to account for vertical air
    temperature gradient and for difference between operative temperature and air temperature, when room height is
    4 metres or higher.

    **params**
    -   `T_i_d`
        Internal design temperature of the room.
    -   `gT_a`
        Air temperature gradient of the heat emission system used in the room; see EN 12831-1 B.2.6.
    -   `h`
        Mean height of the considered building element above floor level.
    -   `h_occ`
        Height of the occupied zone in the room (default 1 m cf. EN 12831-1 B.2.6).
    -   `dT_rad`
        Correction term to allow for differing air and operative temperatures; see EN 12831-1 B.2.6.
    """
    unpacker = UnPacker(params)
    T_i_d: float = unpacker.unpack('T_i_d', 'degC')
    gT_a: float = unpacker.unpack(
        'gT_a', 'K / m', 1.0)  # see EN 12831-1, Annex B.2.6, table B.3
    h: float = unpacker.unpack('h', 'm', 0.0)
    h_occ: float = unpacker.unpack('h_occ', 'm',
                                   1.0)  # see EN 12831-1, Annex B.2.6
    dT_rad: float = unpacker.unpack(
        'dT_rad', 'K', 0.0)  # see EN 12831-1, Annex B.2.6, table B.3
    T_ai = T_i_d + gT_a * (0.5 * h - h_occ) - dT_rad
    return T_ai
Esempio n. 9
0
 def __init__(self, heated_space: 'HeatedSpace', **params):
     """
     **params**
     - `A`
     - `U`
     - `f1`
     """
     self.heated_space = heated_space
     unpacker = UnPacker(params)
     self.A: float = unpacker.unpack('A', 'm ** 2')
     self.U: float = unpacker.unpack('U', 'W / (m ** 2 * K)')
     self.T_i_d: float = self.heated_space.T_i_d
     self.T_e_d: float = self.heated_space.T_e_d
     self.T_sm: float = self._set_T_sm(T_id=self.T_i_d,
                                       gT_a=self.heated_space.gT_a,
                                       h=self.heated_space.h_r,
                                       h_occ=self.heated_space.h_occ,
                                       dT_s=self.heated_space.dT_s)
     self.f1 = unpacker.unpack(
         'f1', default_value=None)  # see EN 12831-1, Annex B.2.4 or Annex D
     self.T_adj = None
     self.f_T = None
     self._H = None
Esempio n. 10
0
def temperature_drop(**params) -> Qty:
    """
    Estimate temperature drop during thermostat setback.

    **params**
    -   `T_i_d`
        Internal design temperature.
    -   `T_e_sb`
        External temperature during setback period; if unknown, the external design temperature may be assumed.
    -   `t_sb`
        Setback period.
    -   `tau`
        Building time constant.
    """
    unpacker = UnPacker(params)
    T_i_d = unpacker.unpack('T_i_d', 'degC')
    T_e_sb = unpacker.unpack('T_e_sb', 'degC')
    t_sb = unpacker.unpack('t_sb', 'hr')
    tau = unpacker.unpack('tau', 'hr')
    dT_sb = (T_i_d - T_e_sb) * (1 - math.exp(-t_sb / tau))
    return Qty(dT_sb, 'K')
Esempio n. 11
0
def air_permeability_50(**params) -> float:
    """
    Calculate air permeability `q_env_50` at 50 Pa from air tightness measurement.

    **params**
    -   `V_build`
        Internal building volume (air volume).
    -   `A_env_build`
        Envelope of the building.
    -   `n_50_meas`
        Measured air change rate [1/hr] at 50 Pa determined with small openings closed.
    -   `A_small_openings`
        Total area of small openings (not ATDs).
    """
    unpacker = UnPacker(params)
    V_build = unpacker.unpack('V_build', 'm ** 3')
    A_env_build = unpacker.unpack('A_env_build', 'm ** 2')
    n_50_meas = unpacker.unpack('n_50_meas', '1 / hr')
    A_small_openings = unpacker.unpack('A_small_openings', 'cm ** 2')
    n_50 = n_50_meas + 2 * A_small_openings / V_build
    q_env_50 = n_50 * V_build / A_env_build
    return q_env_50
Esempio n. 12
0
    def __init__(self, ventilation_zone: 'VentilationZone', name: str,
                 climate_data: ClimateData, **params):
        """
        **params**
        -   `T_i_d`
            Internal design temperature of the considered heated space; see EN 12831-1, Annex B.4.2
        -   `A_fl`
            Floor area of heated space.
        -   `V_r`
            Volume of heated space.
        -   `h_r`
            Room height of heated space.
        -   `h_occ`
            Height of the occupied zone in the room. Only required in with large ceiling heights (≥4 m);
            see EN 12831-1, Annex B.2.6
        -   `gT_a`
            Air temperature gradient of the heat emission system used in the room; see EN 12831-1, Annex B.2.6,
            table B.3.
        -   `dT_s`
            Correction term to allow for differing air and surface temperatures (e.g. increased floor or wall
            temperatures due to illumination, by radiant heaters, due to floor heating); see EN 12831-1, Annex B.2.6,
            table B.3.
        -   `dT_rad`
            Correction term to allow for differing air and operative temperatures; see EN 12831-1, Annex B.2.6,
            table B.3.
        -   `n_min`
            Minimum air change rate of the room; see EN 12831-1, Annex B.2.10, table B.7.
        -   `V_open`
            External air volume flow through large openings in the building envelope for the room. Optional:
            only required if large openings are to be considered; see EN 12831-1 Annex G.
        -   `V_ATD_d`
            Design air volume flow of the ATDs in the room. Optional: only required with ATDs; see EN 12831-1 B.2.12.
            ATD (Air Terminal Device) is a passive device allowing air flow through a building element. It does NOT
            include air out-/inlets of fan-assisted ventilation systems.
        -   `V_sup`
            Supply air volume flow of the room in case of ventilation system with supply air.
        -   `V_trf`
            Transfer air volume flow into the heated space.
        -   `V_exh`
            Exhaust air volume flow from the heated space in case of ventilation system with exhaust air.
        -   `V_comb`
            Air volume flow exhausted from the heated space that, in case of a ventilation system, has not been
            included in the exhaust air volume flow of the ventilation system – typically, but not necessarily for
            combustion air; optional: only required if there is such a technical system (e.g. open flue heaters).
        -   `T_sup`
            Temperature of the supply air volume flow into zone after passing heat recovery, but without “active”
            preheating; optional: only required in ventilation systems with exhaust and supply air; in case of actively
            preheated supply air, `T_sup` is not the actual supply air temperature but the temperature that the supply
            air would have if it had not been preheated; see EN 12831-1 §6.3.3.7
        -   `T_trf`
            Temperature of the transfer air volume flow into the heated space from another space; optional: only
            required in spaces with internal air transfer from one space to another.
        -   `q_hu`
            Specific additional power for heating up after temperature setback for the room; see EN 12831-1, Annex F.
        """
        # name of the heated space
        self.name = name
        # input parameters
        unpacker = UnPacker(params)
        self.T_i_d: float = unpacker.unpack('T_i_d', 'degC')
        self.T_e_d: float = climate_data.T_e_d
        self.T_e_an: float = climate_data.T_e_an
        self.A_fl: float = unpacker.unpack('A_fl', 'm ** 2')
        self.V_r: float = unpacker.unpack('V_r', 'm ** 3')
        self.h_r: float = unpacker.unpack('h_r', 'm', 2.7)
        self.h_occ: float = unpacker.unpack('h_occ', 'm',
                                            1.0)  # see EN 12831-1, Annex B.2.6
        self.gT_a: float = unpacker.unpack(
            'gT_a', 'K / m', 1.0)  # see EN 12831-1, Annex B.2.6, table B.3
        self.dT_s: float = unpacker.unpack(
            'dT_s', 'K', 0.0)  # see EN 12831-1, Annex B.2.6, table B.3

        self.dT_rad: float = unpacker.unpack(
            'dT_rad', 'K', 0.0)  # see EN 12831-1, Annex B.2.6, table B.3
        self.n_min: float = unpacker.unpack(
            'n_min', '1 / hr', 0.5)  # see EN 12831-1, Annex B.2.10, table B.7
        self.V_open: float = unpacker.unpack('V_open', 'm ** 3 / hr')
        self.V_ATD_d: float = unpacker.unpack(
            'V_ATD_d', 'm ** 3 / hr')  # see EN 12831-1, Annex B.2.12
        self.V_sup: float = unpacker.unpack('V_sup', 'm ** 3 / hr')
        self.V_trf: float = unpacker.unpack('V_trf', 'm ** 3 / hr')
        self.V_exh: float = unpacker.unpack('V_exh', 'm ** 3 / hr')
        self.V_comb: float = unpacker.unpack('V_comb', 'm ** 3 / hr')
        self.T_sup: float = unpacker.unpack('T_sup', 'degC')
        self.T_trf: float = unpacker.unpack('T_trf', 'degC')

        self.q_hu: float = unpacker.unpack(
            'q_hu', 'W / m ** 2')  # see EN 12831-1, Annex F
        # reference to the building elements that constitute the heated space. Building elements are stored in
        # separate lists according to their category.
        self.building_elements: Dict[str, List[BuildingElement]] = {
            category: []
            for category in CATEGORIES
        }
        # reference to the ventilation zone the heated space is part of
        self.ventilation_zone: Optional[VentilationZone] = ventilation_zone
Esempio n. 13
0
def external_design_temperature(**params) -> float:
    """
    Adjust external design temperature to account for influence of geographical height and influence of thermal mass
    of the building.

    **params**
    -   `T_e_ref`
        External design temperature for the designated reference site.
    -   `gT_ref`
        Temperature gradient for the designated reference site; see NBN EN 12831-1 Annex NA.2.
    -   `h_build`
        Mean height of the considered building above sea level (or ground level at the building site).
    -   `h_ref`
        Height of reference site above sea level.
    -   `k_tau`
        Slope; see EN 12831-1 B.4.1, table B.13.
    -   `tau`
        Time constant of the considered building.
    -   `dT_e_0`
        Basic value; see EN 12831-1 B.4.1, table B.13.
    -   `dT_e_max`
        Upper limit; see EN 12831-1 B.4.1, table B.13.
    -   `dT_e_min`
        Lower limit; see EN 12831-1 B.4.1, table B.13.
    """
    unpacker = UnPacker(params)
    T_e_ref = unpacker.unpack('T_e_ref', 'degC')
    gT_ref = unpacker.unpack('gT_ref',
                             'K / m')  # see NBN EN 12831-1, Annex NA.2
    h_build = unpacker.unpack('h_build', 'm')
    h_ref = unpacker.unpack('h_ref', 'm')
    k_tau = unpacker.unpack('k_tau', 'K / hr',
                            0.016)  # see EN 12831-1, Annex B.4.1, table B.13
    tau = unpacker.unpack('tau', 'hr')
    dT_e_0 = unpacker.unpack('dT_e_0', 'K',
                             -0.8)  # see EN 12831-1, Annex B.4.1, table B.13
    dT_e_max = unpacker.unpack('dT_e_max', 'K',
                               4.0)  # see EN 12831-1, Annex B.4.1, table B.13
    dT_e_min = unpacker.unpack('dT_e_max', 'K',
                               0.0)  # see EN 12831-1, Annex B.4.1, table B.13
    T_e_0 = T_e_ref + gT_ref * (h_build - h_ref)
    dT_e_tau = max(min(k_tau * tau + dT_e_0, dT_e_max), dT_e_min)
    T_e_d = T_e_0 + dT_e_tau
    return T_e_d