def calc_el_eff_with_p_el(el_power):
    """
    Returns electric efficiency of CHP (input: electric power in W)

    Parameters
    ----------
    el_power : float
        Electric output power in W

    Returns
    ------
    el_eff : float
        Electric efficiency (without unit)
    """

    assert el_power >= 0

    #  Asue classes of electric nominal power
    if el_power <= 10*1000:  # Factor 1000 to convert kW into W
        el_eff = 0.21794*(el_power/1000)**0.108
    elif el_power <= 100*1000:
        el_eff = 0.2256*(el_power/1000)**0.1032
    elif el_power <= 1000*1000:
        el_eff = 0.25416*(el_power/1000)**0.0732
    else:  # Larger than 1000 kW el. power
        el_eff = 0.29627*(el_power/1000)**0.0498
    assert el_eff >= 0
    assert el_eff <= 1
    return el_eff