def trap_W(w, t, ratio):
    """Return section modulus for trapezoid cross-sections.

    W_trap = (w^2 + 4wW + W^2)/(w+2W) × t^2/12
    Source: Lueger 1904

    Args:
        w: width
        t: thickness
        ratio: the ratio of back width to belly width

    Returns:
        A scalar.
    """
    sw = ratio * w
    return (sw ** 2 + 4 * sw * w + w ** 2) / (sw + 2 * w) * t ** 2 / 12
