r'''Calculates saltation velocity of the gas for pneumatic conveying,
    according to [1]_ as described in [2]_ and many others.

    .. math::
        \mu=\left(\frac{1}{10^{1440d_p+1.96}}\right)\left(Fr_s\right)^{1100d_p+2.5}

        Fr_s = \frac{V_{salt}}{\sqrt{gD}}

        \mu = \frac{m_p}{\frac{\pi}{4}D^2V \rho_f}

    Parameters
    ----------
    mp : float
        Solid mass flow rate, [kg/s]
    dp : float
        Particle diameter, [m]
    rhog : float
        Gas density, [kg/m^3]
    D : float
        Diameter of pipe, [m]

    Returns
    -------
        V : float
            Saltation velocity of gas, [m/s]

    Notes
    -----
    Model is rearanged to be explicit in terms of saltation velocity
    internally.

    Examples
    --------
    Example is from [3]_.

    >>> Rizk(mp=0.25, dp=100E-6, rhog=1.2, D=.078)
    9.8833092829357

    References
    ----------
    .. [1] Rizk, F. "Pneumatic conveying at optimal operation conditions and a
       solution of Bath's equation." Proceedings of Pneumotransport 3,
       paper D4. BHRA Fluid Engineering, Cranfield, England (1973)
    .. [2] Klinzing, G. E., F. Rizk, R. Marcus, and L. S. Leung. Pneumatic
       Conveying of Solids: A Theoretical and Practical Approach.
       Springer, 2013.
    .. [3] Rhodes, Martin J. Introduction to Particle Technology. Wiley, 2013.

def Rizk(mp, dp, rhog, D):
    r'''Calculates saltation velocity of the gas for pneumatic conveying,
    according to [1]_ as described in [2]_ and many others.

    .. math::
        \mu=\left(\frac{1}{10^{1440d_p+1.96}}\right)\left(Fr_s\right)^{1100d_p+2.5}

        Fr_s = \frac{V_{salt}}{\sqrt{gD}}

        \mu = \frac{m_p}{\frac{\pi}{4}D^2V \rho_f}

    Parameters
    ----------
    mp : float
        Solid mass flow rate, [kg/s]
    dp : float
        Particle diameter, [m]
    rhog : float
        Gas density, [kg/m^3]
    D : float
        Diameter of pipe, [m]

    Returns
    -------
        V : float
            Saltation velocity of gas, [m/s]

    Notes
    -----
    Model is rearanged to be explicit in terms of saltation velocity
    internally.

    Examples
    --------
    Example is from [3]_.

    >>> Rizk(mp=0.25, dp=100E-6, rhog=1.2, D=.078)
    9.8833092829357

    References
    ----------
    .. [1] Rizk, F. "Pneumatic conveying at optimal operation conditions and a
       solution of Bath's equation." Proceedings of Pneumotransport 3,
       paper D4. BHRA Fluid Engineering, Cranfield, England (1973)
    .. [2] Klinzing, G. E., F. Rizk, R. Marcus, and L. S. Leung. Pneumatic
       Conveying of Solids: A Theoretical and Practical Approach.
       Springer, 2013.
    .. [3] Rhodes, Martin J. Introduction to Particle Technology. Wiley, 2013.
    '''
    alpha = 1440*dp + 1.96
    beta = 1100*dp + 2.5
    term1 = 1./10**alpha
    Frs_sorta = 1/(g*D)**0.5
    expression1 = term1*Frs_sorta**beta
    expression2 = mp/rhog/(pi/4*D**2)
    V = (expression2/expression1)**(1./(1 + beta))
    return V