The issue occurs in this part of your calculation
math.sqrt(r_out ** 2 - (w / math.pi) * (math.sqrt(x_i ** 2 + dL ** 2)))
looking at the values when this errors
r_out = 0.889
w = 0.03175
x_i = 72.2987746569653
dL = 30
If we plug these in the calculations and start solving
math.sqrt(0.889 ** 2 - (0.03175 / math.pi) * (math.sqrt(72.2987746569653 ** 2 + 30 ** 2)))
math.sqrt(0.889 ** 2 - (0.03175 / math.pi) * (math.sqrt(5227.112816898649 + 900)))
math.sqrt(0.889 ** 2 - (0.03175 / math.pi) * (math.sqrt(6127.112816898649)))
math.sqrt(0.889 ** 2 - (0.03175 / math.pi) * (78.27587634066225))
math.sqrt(0.889 ** 2 - (0.010106338886335354) * (78.27587634066225))
math.sqrt(0.790321 - (0.010106338886335354) * (78.27587634066225))
#now here multiplaction takes precedence over subtraction
math.sqrt(0.790321 - 0.7910825329236124)
math.sqrt(-0.0007615329236123625)
#This is an error as negative number cannot have a real root.
If you mean for r_out ** 2 - (w / math.pi)
to happen before the multiplication then you need to put brackets around it
Fc_i = (k * v_i ** 2 * math.cos(math.atan(30 / x_i)) / 2 * (
math.sqrt((r_out ** 2 - (w / math.pi)) * (math.sqrt(x_i ** 2 + dL ** 2)))))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…