- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
背景
传统上,我使用 NREL SAM 工具来估算太阳能输出。我一直在尝试 PVLIB,由于其开放性和灵 active ,它非常好,但我似乎无法协调 PVLIB 和 NREL SAM 之间的太阳能产量估计。
我做了什么
我正在模拟昆士兰州金皮附近的一个假设太阳能发电厂。我访问了 climate.onebuiling 网站,并下载了“AUS_QLD_Gympie.AP.945660_TMYx.2003-2017”的 zip 文件夹/epw 文件。然后,我使用 PVwatts 在 NREL 的 SAM 工具中使用该天气文件,具有以下规范;
在 NREL SAM 中,我的年能源产量 (AC GWh) 为每年 415.96 GWh。
然后,我获取了相同的 epw 文件并将其转换为 csv,仅保留 ghi、dni、dhi、temp_air 和 Wind_speed ( Google Drive link to CSV file ) 的列。我已将此文件用作 PVLIB 的导入。我指定了一个与上述规范相同的 PVLIB 系统,但增加了反照率 = 0.2 和最大角度 = 90 度(下面的代码)。
我在 PVLIB 中得到的结果是 395.61 GWh。
问题
我得到的结果有很大不同。 PVLIB = 每年约 395 GWh vs SAM = 每年约 415 GWH我预计会有 1-2% 左右的差异,但不是 5%。
当我与使用clearsky.ineichen(通过 linke_turbidity 调整)的 PVLIB 系统进行比较时,数字甚至更糟,该系统每年产量约为 475 GWh
请求帮助
有人知道为什么我的结果如此不同吗?我能做些什么来缩小差距吗?
PVLIB代码
# **********************************************************
# IMPORT LIBRARIES
# **********************************************************
import pandas as pd
from pvlib.pvsystem import PVSystem
from pvlib import clearsky, atmosphere, solarposition, irradiance
from pvlib.location import Location
from pvlib.tracking import SingleAxisTracker
from pvlib.modelchain import ModelChain
from pvlib.temperature import TEMPERATURE_MODEL_PARAMETERS
# **********************************************************
# LOCATION & SOLAR SIZE INPUTS
# **********************************************************
# Lat and Long desired
lat = -26.18
lon = 152.63
# Set Location
tz, altitude, name = 'Australia/Queensland', 10, 'Gympie/QLD'
# Set location details for model
latitude, longitude, = lat, lon
location = Location(latitude, longitude, tz, altitude, name)
# load some module and inverter specifications
module_parameters = {'pdc0': 200000000, 'gamma_pdc': -0.004}
inverter_parameters = {'pdc': 166666666, 'pdc0': 166666666, 'eta_inv_nom': 0.96}
temperature_model_parameters = TEMPERATURE_MODEL_PARAMETERS['sapm']['open_rack_glass_glass']
# **********************************************************
# ONEBUILDING DATA
# **********************************************************
df = pd.read_csv('weather import.csv')
df['time'] = df['time'].astype('datetime64[ns]')
df.set_index(['time'], inplace=True)
df.index = df.index.tz_localize(tz=tz)
df = df.asfreq(freq='1h')
onebuilding = df
# **********************************************************
# INEICHEN CLEAR SKIES ADJUSTED FOR TURBIDITY
# **********************************************************
# Create PVLib inputs
times = df.index
solpos = solarposition.get_solarposition(times, latitude, longitude)
apparent_zenith = solpos['zenith']
rel_airmass = atmosphere.get_relative_airmass(apparent_zenith)
pressure = atmosphere.alt2pres(altitude)
abs_airmass = atmosphere.get_absolute_airmass(rel_airmass, pressure)
linke_turbidity = clearsky.lookup_linke_turbidity(times, latitude, longitude)
dni_extra = irradiance.get_extra_radiation(times)
ineichen = clearsky.ineichen(apparent_zenith, abs_airmass, linke_turbidity, altitude, dni_extra)
ineichen.to_csv('ineichen.csv')
# **********************************************************
# SELECT WHICH WEATHER DATA TO USE (ineichen v onebuilding)
# **********************************************************
# Select which version we wish to use (onebuilding, ineichen)
selected_irrad = onebuilding
print(selected_irrad)
# Create Weather File
weather = pd.DataFrame(data={'ghi': selected_irrad.ghi, 'dni': selected_irrad.dni,
'dhi': selected_irrad.dhi, 'temp_air': df['temp_air'],
'wind_speed': df['wind_speed']})
# **********************************************************
# CREATE PV SYSTEM AND PV MODEL CHAIN
# **********************************************************
# Define the specs for the PV System (fixed system)
f_system = PVSystem(
surface_tilt=abs(lat),
surface_azimuth=0,
albedo=0.2,
module='pvwatts_dc',
inverter='pvwatts_ac',
module_parameters=module_parameters,
inverter_parameters=inverter_parameters,
racking_model='open_rack_glass_glass',
name='fixed',
temperature_model_parameters=temperature_model_parameters
)
# Define the specs for the PV System (1 axis tracking system)
t_system = SingleAxisTracker(
axis_tilt=0,
axis_azimuth=0,
max_angle=90,
backtrack=True,
module='pvwatts_dc',
inverter='pvwatts_ac',
module_parameters=module_parameters,
inverter_parameters=inverter_parameters,
name='tracking',
gcr=.40,
)
# build model chain
mc = ModelChain(
system=t_system,
location=location,
name='pvwatts',
dc_model='pvwatts',
ac_model='pvwatts',
losses_model='pvwatts',
aoi_model='physical',
spectral_model='no_loss',
temperature_model='sapm')
# run model chain
mc.run_model(weather=weather)
print(mc.ac.sum())
最佳答案
如果不详细比较中间结果,很难确切地说出每年的能量不同的原因。一个影响因素似乎是转置模型(GHI、DHI 和 DNI 到阵列平面):pvlib ModelChain默认为 Hay/Davies 模型,我相信 SAM默认为 Perez 1990 型号。这两个模型的年阵列平面辐照度会存在几个百分点的差异,该辐照度随漫射辐照度和直接辐照度的相对水平而变化;请参阅Lave et al. Figure 6 .
您可以通过将 transposition_model = 'perez',
添加到 mc
实例来选择 pvlib 中的 Perez 1990 模型。我预计这会缩小 pvlib 和 SAM 结果之间的差异,并且对您的发现很感兴趣。
使用 TMY 天气文件进行的计算不会得到与使用晴空模型的辐照度进行计算相同的结果,因为 TMY 是根据历史天气记录组合而成的,因此包括多云时段。
关于python - 无法协调 PVLIB 输出与 NREL SAM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60218037/
我正在寻找一个公式来根据以下数据计算太阳高度角。我已通过提供所需的纬度和经度将数据下载到 Excel 工作表中。 问题是: 如何根据天顶角和方位角计算仰角? 什么是引用顶部。方位角(从 S 向西)和顶
背景 传统上,我使用 NREL SAM 工具来估算太阳能输出。我一直在尝试 PVLIB,由于其开放性和灵 active ,它非常好,但我似乎无法协调 PVLIB 和 NREL SAM 之间的太阳能产量
我是一名优秀的程序员,十分优秀!