def expression_polynomial(cobj, prop, T):
    """
    Create expressions for CoolProp rational polynomial forms

    Args:
        cobj: Component object that will contain the parameters
        prop: name of property parameters are associated with
        T: temperature to use in expression

    Returns:
        Pyomo expression mathcing CoolProp rational polynomial form
    """
    i = 0
    asum = 0
    try:
        while True:
            Ai = getattr(cobj, f"{prop}_coeff_A{i}")
            asum += Ai * T**i
            i += 1
    except AttributeError:
        pass

    i = 0
    bsum = 0
    try:
        while True:
            Bi = getattr(cobj, f"{prop}_coeff_B{i}")
            bsum += Bi * T**i
            i += 1
    except AttributeError:
        pass

    return asum / bsum