def P_from_head(head, rho, g=g):
    """Calculates head for a fluid of specified density at specified
    pressure.

    .. math::
        P = \\rho g \\cdot \\text{head}

    Parameters
    ----------
    head : float
        Head, [m]
    rho : float
        Density of fluid, [kg/m^3]
    g : float, optional
        Acceleration due to gravity, [m/s^2]

    Returns
    -------
    P : float
        Pressure fluid in pipe, [Pa]

    Notes
    -----

    Examples
    --------
    >>> P_from_head(head=5., rho=800.)
    39226.6
    """
    return head * rho * g
