def thermal_time_constant_as_considered_load(TauR, dTOr, dTOi, dTOu, n):
    """ Returns the average oil time constant in minutes (for a given load)
    As per IEEE C57.91-2011
    TauR = Thermal time constant at rated load
    dTOr = Top oil rise at rated load
    dTOi = Top oil rise initial
    dTOu = Top oil rise ultimate (at load considered)
    n = Temperature cooling exponent (From IEEE C57.91-2011 Table 4)
    """
    a = dTOu / dTOr
    b = dTOi / dTOr
    if (a - b) == 0 or n == 0:
        # Will avoid divide by zero error
        STTTC = TauR
    else:
        try:
            STTTC = TauR * (a - b) / ((a**(1 / n)) - (b**(1 / n)))
        except ZeroDivisionError:
            STTTC = TauR    # The a-b didn't catch the error
    return STTTC