所以我编写了这个公式
我得到:
def sumAN(theta,CoefAN,n_cl):
# this function give us the sumatory in the right side of the formula
Sumatorio = np.array([])
for count,i in enumerate(theta):
sumatorio = 0
for count2,j in enumerate(n_cl):
sumatorio = sumatorio +CoefAN[count2]*sin(int(count2+1)*i)
Sumatorio = np.append(Sumatorio,sumatorio)
return Sumatorio
cl= 4*((np.radians(alpha)+A0)*tan(theta/2)+sumAN(theta,CoefAN,n_cl))
稍微解释一下:
- Alpha:常量
- A0:常量
- AN :np.array([])(n 值)
- theta:自变量
在此之后,我需要计算下一个积分:
这是我遇到问题的地方:
ch = integrate.quad(lambda theta:(4*((alpha_char+A0)*tan(theta/2)+sumAN(theta,CoefAN,n_charl)))*(cos(theta)-cos(xa))*sin(theta),0,xa)[0]
我有所有的限制和一切。但我得到下一个错误:
“浮动”对象不可迭代
我不知道如何继续。所以我的问题是:如何使用integrate.quad 方法集成这个函数?也许我会改变总结的方式?我如何以其他方式编写函数?提前致谢
牛魔王的故事
相关分类