缺少数组是怎么回事呢?我明明定义的是子函数呢。
If (V - Vknew > 10 ^ -4) ThenV = V - Vknew
bmin = Y2(3) + Tan(φkln * 3.14 / 180) * X2(3)
bmax = Y2(2) + Tan(φkln * 3.14 / 180) * X2(2)
beq = (bmin + bmax) / 2
Vknew = V_k5(beq)
Do
While (Vknew < V)
bmin = beq
beq = (bmin + bmax) / 2
Vknew = V_k5(beq)
Wend
While (Vknew > V)
bmax = beq
beq = (bmin + bmax) / 2
Vknew = V_k5(beq)
Wend
Loop Until (Abs(Vknew - V) < 10 ^ -4)
Function V_k5(b As Single) As Double
Xpl = (b - Y2(2) + X2(2) * T(2)) / (Tan(φkln * 3.14 / 180) + T(2))
Ypl = b - Tan(φkln * 3.14 / 180) * Xpl
Xpr = 0: Ypr = b
V_k5 = -2 * 3.14 / 3 * (Tan(φkln * 3.14 / 180) + T(2)) * (Xpr ^ 3 - Xpl ^ 3)
V_k5 = V_k5 + 2 * 3.14 / 2 * (T(2) * X2(2) + b - Y2(2)) * (Xpr ^ 2 - Xpl ^ 2)
End Function