import math


def phi2b(d, u, phi, flow, x=1, eta_vol=1):
    """Calculate impeller width for a given flow number.

    :param d (float): diameter [m]
    :param u (float): blade velocity [m/s]
    :param phi (float): flow number
    :param flow (float): flow rate [m^3/s]
    :param x (float): blade blockage
    :param eta_vol (float): volumetric efficency
    :return b (float): impeller width [m]
    """
    b = flow / (math.pi * d * u * phi * x * eta_vol)

    return b