分析了光伏组件空气玻璃界面上的减反射膜。

pvarc的Python项目详细描述


pvarc公司

太阳能组件空气-玻璃界面减反射膜测试分析

简介

许多太阳能组件在空气玻璃界面上有一层防反射涂层(ARC)。该界面通常由一层约125nm的多孔二氧化硅层组成。这个软件包允许用户模拟这些弧的反射性能。它还为计算太阳加权光子反射率提供了方便的函数,这是衡量涂层性能的一个很好的指标。在

安装

要设置虚拟环境,请创建虚拟环境:

conda create --name pvarc python=3 numpy pandas scipy matplotlib
pip install tmm

要使用pip安装,请运行:

^{pr2}$

示例

第一个例子使用弧反射模型来生成合成反射曲线。然后利用同一模型的拟合提取涂层参数。这个例子可以用来证明提取真实参数的准确性。在

"""Example for generating a synthetic reflection spectrum, fitting to thesingle-layer-coating model and finding the solar weighted photon reflectanceand power enhancement due to the coating.Todd Karin"""importnumpyasnpimportpandasaspdimportmatplotlibmatplotlib.use('TkAgg')importmatplotlib.pyplotaspltfrompvarcimportsingle_interface_reflectancefrompvarc.metricsimportsolar_weighted_photon_reflectionfrompvarc.fitimportfit_arc_reflection_spectrum,arc_reflection_modelfrompvarc.materialsimportrefractive_index_glassfrompvarc.oceaninsightimportread_oceanview_file# Create a synthetic reflection curve based on the theoretical model. To run on# a different dataset, simply import the data as `wavelength` and `reflection`.wavelength=np.linspace(200,1100,500)param_true={'thickness':125,'fraction_abraded':0.05,'fraction_dust':0.0,'porosity':0.3}reflection=arc_reflection_model(wavelength,**param_true)reflection=reflection+np.random.normal(0,2e-4,wavelength.shape)# Plot dataplt.figure(0)plt.clf()plt.plot(wavelength,100*reflection,label='Data',color=[0,0,0.8])# Fit modelx,ret=fit_arc_reflection_spectrum(wavelength,reflection,model='TPA',aoi=8,wavelength_min=450,wavelength_max=1000,method='basinhopping',verbose=True)wavelength_extend=np.linspace(300,1250,1000)reflection_fit=arc_reflection_model(wavelength_extend,**x)# Calculate solar weighted photon reflection (SWPR) using fitswpr=solar_weighted_photon_reflection(wavelength_extend,reflection_fit)# Calculate SWPR for glass referenceindex_glass=refractive_index_glass(wavelength_extend)reflection_BK7=single_interface_reflectance(n0=1.0003,n1=index_glass,aoi=8)swpr_bk7=solar_weighted_photon_reflection(wavelength_extend,reflection_BK7)# Calculate power enhancement due to coating.power_enchancement=swpr_bk7-swpr# Compare fit vs simulated value.print('--\nComparison of true values vs. best fit')forpin['thickness','porosity','fraction_abraded']:print('{}.\t True: {:.2f}, Fit: {:.2f}, '.format(p,param_true[p],x[p]))# Plot theory.plt.plot(wavelength_extend,100*reflection_fit,label='Fit',linewidth=3,color=[1,0.5,0,0.5],)plt.text(450,3,'*Best fit parameters*\n'+ \
         'Thickness: {:.0f} nm\n'.format(x['thickness'])+ \
         'Porosity: {:.0%}\n'.format(x['porosity'])+ \
         'Fraction Abraded: {:.1%}\n'.format(x['fraction_abraded'])+ \
         'SWPR (400-1100 nm): {:.1%}\n'.format(swpr)+ \
         'PE (400-1100 nm): {:.1%}\n'.format(power_enchancement),fontsize=8,)plt.xlabel('Wavelength (nm)')plt.ylabel('Reflection (%)')plt.ylim([0,8])plt.xlim([300,1250])plt.legend()plt.show()# plt.savefig('example_out.png',dpi=200)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java在运行Eclipse导出的jar时出现“找不到主类”错误   java GPS位置之间距离和方位的精度   java ClassLoader()与java之间的区别是什么。getResourceAsStream(“./path”)和类加载器()。getResourceAsStream(“路径”)   jdbc url中的java Set用户变量   java我不能在框架中拖放   如何在java中添加控制台输出窗口?   java如何以水平方式加载JList?   java基于Maven结果构建不同的Docker映像(与Jenkins一起)   java正在遍历一个文件   java在Eclipse中添加外部库   java Eclipse在未关闭ServletOutputStream时抱怨资源泄漏   java如何在安卓应用程序中读取弹出窗口中的文本?   java<s:if>标记不起作用   使用java中的云存储JSON API在Google云中恢复上传文本文件,面临403错误代码禁止访问的问题   java迭代快速排序步骤?   java如何使用时区ID获得GMT等效值   java如何使用junit测试@RestController的@RequestBody?   java如何在安卓中使用smack库在xmpp传入消息中获取时间戳