def calc_chiller_absorption_operation(Qc_from_ACH_W, T_DCN_re_K, T_DCN_sup_K, T_ground_K, prices, lca, config, limits):
    ACH_type = 'double'
    opex_var_ACH_USD = 0
    co2_ACH_kgCO2perhr = 0
    prim_energy_ACH_MJperhr = 0
    Qc_CT_ACH_W = 0
    Qh_CHP_ACH_W = 0
    locator = cea.inputlocator.InputLocator(scenario=config.scenario)  # TODO: move out

    if Qc_from_ACH_W < limits['Qnom_ACH_W']:  # activate one unit of ACH
        # calculate ACH operation
        if T_DCN_re_K == T_DCN_sup_K:
            mdot_ACH_kgpers = 0
        else:
            mdot_ACH_kgpers = Qc_from_ACH_W / (
                (T_DCN_re_K - T_DCN_sup_K) * HEAT_CAPACITY_OF_WATER_JPERKGK)  # required chw flow rate from ACH
        ACH_operation = chiller_absorption.calc_chiller_main(mdot_ACH_kgpers, T_DCN_sup_K, T_DCN_re_K,
                                                             ACH_T_IN_FROM_CHP, T_ground_K, ACH_type, Qc_from_ACH_W,
                                                             locator, config)
        opex_var_ACH_USD = (ACH_operation['wdot_W']) * lca.ELEC_PRICE
        co2_ACH_kgCO2perhr = (ACH_operation['wdot_W']) * lca.EL_TO_CO2 * 3600E-6
        prim_energy_ACH_MJperhr = (ACH_operation['wdot_W']) * lca.EL_TO_OIL_EQ * 3600E-6
        Qc_CT_ACH_W = ACH_operation['q_cw_W']
        Qh_CHP_ACH_W = ACH_operation['q_hw_W']
    else:  # more than one unit of ACH are activated
        number_of_chillers = limits['number_of_ACH_chillers']
        if T_DCN_re_K == T_DCN_sup_K:
            mdot_ACH_kgpers = 0
        else:
            mdot_ACH_kgpers = Qc_from_ACH_W / (
                (T_DCN_re_K - T_DCN_sup_K) * HEAT_CAPACITY_OF_WATER_JPERKGK)  # required chw flow rate from ACH
        mdot_ACH_kgpers_per_chiller = mdot_ACH_kgpers / number_of_chillers
        for i in range(number_of_chillers):
            ACH_operation = chiller_absorption.calc_chiller_main(mdot_ACH_kgpers_per_chiller, T_DCN_sup_K, T_DCN_re_K,
                                                                 ACH_T_IN_FROM_CHP,
                                                                 T_ground_K, ACH_type, limits['Qnom_ACH_W'], locator, config)
            if type(ACH_operation['wdot_W']) is int:
                opex_var_ACH_USD = opex_var_ACH_USD + (ACH_operation['wdot_W']) * lca.ELEC_PRICE
                co2_ACH_kgCO2perhr = co2_ACH_kgCO2perhr + (ACH_operation['wdot_W']) * lca.EL_TO_CO2 * 3600E-6
                prim_energy_ACH_MJperhr = prim_energy_ACH_MJperhr + (ACH_operation['wdot_W']) * lca.EL_TO_OIL_EQ * 3600E-6
                Qc_CT_ACH_W = Qc_CT_ACH_W + ACH_operation['q_cw_W']
                Qh_CHP_ACH_W = Qh_CHP_ACH_W + ACH_operation['q_hw_W']
            else:
                opex_var_ACH_USD = opex_var_ACH_USD + (ACH_operation['wdot_W']) * lca.ELEC_PRICE
                co2_ACH_kgCO2perhr = co2_ACH_kgCO2perhr + (ACH_operation['wdot_W']) * lca.EL_TO_CO2 * 3600E-6
                prim_energy_ACH_MJperhr = prim_energy_ACH_MJperhr + (ACH_operation['wdot_W']) * lca.EL_TO_OIL_EQ * 3600E-6
                Qc_CT_ACH_W = Qc_CT_ACH_W + ACH_operation['q_cw_W']
                Qh_CHP_ACH_W = Qh_CHP_ACH_W + ACH_operation['q_hw_W']

    E_used_ACH_W = opex_var_ACH_USD / lca.ELEC_PRICE

    return opex_var_ACH_USD, co2_ACH_kgCO2perhr, prim_energy_ACH_MJperhr, Qc_CT_ACH_W, Qh_CHP_ACH_W, E_used_ACH_W
示例#2
0
def calc_chiller_absorption_operation(Qc_ACH_req_W, T_DCN_re_K, T_DCN_sup_K, T_ACH_in_C, T_ground_K, chiller_prop,
                                      size_ACH_W):
    if T_DCN_re_K == T_DCN_sup_K:
        mdot_ACH_kgpers = 0
    else:
        mdot_ACH_kgpers = Qc_ACH_req_W / (
                (T_DCN_re_K - T_DCN_sup_K) * HEAT_CAPACITY_OF_WATER_JPERKGK)  # required chw flow rate from ACH

    ACH_operation = chiller_absorption.calc_chiller_main(mdot_ACH_kgpers,
                                                         T_DCN_sup_K,
                                                         T_DCN_re_K,
                                                         T_ACH_in_C,
                                                         T_ground_K,
                                                         chiller_prop)

    Qc_CT_ACH_W = ACH_operation['q_cw_W']

    # calculate cooling tower
    wdot_CT_Wh = CTModel.calc_CT(Qc_CT_ACH_W, size_ACH_W)

    # calcualte energy consumption and variable costs
    Qh_CHP_ACH_W = ACH_operation['q_hw_W']
    E_used_ACH_W = ACH_operation['wdot_W'] + wdot_CT_Wh

    return Qc_CT_ACH_W, Qh_CHP_ACH_W, E_used_ACH_W