def calculate_emissions(hr, ef, cap_eff=0):
    """
    Calculate emitted and captured carbon
    :param hr: Heat rate as MJ/MWH
    :param ef: Emission factor as Kg/GJ
    :param cap_eff: Unitless
    :return: emission/capture as kg/MWH
    """
    emitted = hr * ef * (1 - cap_eff)
    captured = hr * ef * cap_eff
    return emitted, captured