def flow_cylinder(diameter=250, length=1, viscosity=1, pressure=0.1,
    output_units='nL'):
    """
    calculates flow rate via a cylindrical capillary with a given diameter, length and fluid viscosity under a given pressure drop. Also takes string value to define output units

    Parameters
    ----------
    length : float
        length of a cylinder in meters
    diameter : float
        diameter of round cross-section in micrometer
    viscosity : float
        viscosity in cP or mPa*s
    pressure : float
        pressure difference in atmospheres
    output_units
        output units for the flow. Supports: nL/s, uL/s. Default: nL/s

    Returns
    -------
    flow : float
        flow of fluid in nL/s

    Examples
    --------
    the example of usage.
    D=50um,L = 1, eta = 1, P = 2 -> 31.086 nL/s
    D=10oum,L = 0.7, eta = 23, P = 2 -> 30.893 nL/s


    >>> flow_cylinder(diameter = 50, length = 1, viscosity = 1.0, pressure = 2.0)
    >>> 31.086120666502506
    """
    from numpy import pi
    diameter = diameter * 10 ** -6
    length = length
    viscosity = viscosity * 10 ** -3
    pressure = pressure * 101325
    flow = pi * pressure * diameter ** 4 / (128 * viscosity * length)
    if output_units == 'pL':
        output_factor = 10 ** 15
    elif output_units == 'nL':
        output_factor = 10 ** 12
    elif output_units == 'uL':
        output_factor = 10 ** 9
    elif output_units == 'mL':
        output_factor = 10 ** 6
    elif output_units == 'L':
        output_factor = 10 ** 3
    else:
        output_factor = 10 ** 12
    return flow * output_factor
