def drain_eta(re, mu_function, *args, **kwargs):
    """Calculate the vertical drain eta parameter for a specific smear zone

    eta = 2 / re**2 / (mu+muw)

    eta is used in radial consolidation equations u= u0 * exp(-eta*kh/gamw*t)

    Parameters
    ----------
    re : float
        Drain influence radius.
    mu_function : obj or string
        The mu_funtion to use. e.g. mu_ideal, mu_constant, mu_linear,
        mu_overlapping_linear, mu_parabolic, mu_piecewise_constant,
        mu_piecewise_linear. This can either be the function object itself
        or the name of the function e.g. 'mu_ideal'.
    muw : float, optional
        Well resistance mu term, default=0.
    *args, **kwargs : various
        The arguments to pass to the mu_function.

    Returns
    -------
    eta : float
        Value of eta parameter

    Examples
    --------

    >>> drain_eta(1.5, mu_ideal, 10)
    0.563178340433...
    >>> drain_eta(1.5, 'mu_ideal', 10)
    0.5631783404334...
    >>> drain_eta(1.5, mu_constant, 5, 1.5, 1.6, muw=1)
    0.4115837724144...

    """
    try:
        mu_fn = globals()[mu_function]
    except KeyError:
        mu_fn = mu_function
    muw = kwargs.pop('muw', 0)
    eta = 2 / re ** 2 / (mu_fn(*args, **kwargs) + muw)
    return eta
