如何计算垂直(房屋)墙壁上的太阳辐射?

2024-04-26 18:43:51 发布

您现在位置:Python中文网/ 问答频道 /正文

我想计算朝北、朝南等方向的墙壁上的太阳辐射。我有这个位置的太阳辐射,我尝试了以下等式:

S_module = S_incident * (math.cos(alpha)*math.sin(beta)*math.cos(psi-theta) + math.sin(alpha)*math.cos(beta))

alpha = 24.86 #sun elevation angle 
theta = 81.58 #sun azimuth angle
beta = 90 #wall tilt angle (vertical module beta=90)
psi = 135 #surface orientation: psi=0 == facing north, psi=180 == facing south; is the azimuth angle that the module faces 
S_incident = 663 [W]

这适用于2019-6-21 6小时时区=utc

我尝试了python包pysolar,在这里可以找到上面的等式:https://www.pveducation.org/pvcdrom/properties-of-sunlight/arbitrary-orientation-and-tilt

我的问题是,我没有得到正确的结果,例如,对于上述属性,结果是-495[W]。这不可能是真的,因为在早上,辐射必须至少有一个小的正值

谢谢你的提示


Tags: alphamathsincosbetasunmoduleorientation
1条回答
网友
1楼 · 发布于 2024-04-26 18:43:51

阅读docs:trig函数以弧度为单位工作;你把它养大了。您的90弧度墙与现实不符。:-)

import math

alpha = 24.86 #sun elevation angle 
theta = 81.58 #sun azimuth angle
beta = 90 #wall tilt angle (vertical module beta=90)
psi = 135 #surface orientation: psi=0 == facing north, psi=180 == facing south; is the azimuth angle that the module faces 
S_incident = 663 # Watts

S_module = S_incident * (math.cos(alpha)*math.sin(beta)*math.cos(psi-theta) +
                         math.sin(alpha)*math.cos(beta))

print(math.cos(alpha), math.sin(alpha))
print(math.cos(beta), math.sin(beta))

输出:

0.9630361043608977 -0.26937234768510715
-0.4480736161291701 0.8939966636005579

这些显然不是您期望的值

使用因子math.pi / 180进行转换

相关问题 更多 >