def test_deprecated_07(): with pytest.warns(pvlibDeprecationWarning): irradiance.extraradiation(300) with pytest.warns(pvlibDeprecationWarning): irradiance.grounddiffuse(40, 900) with pytest.warns(pvlibDeprecationWarning): irradiance.total_irrad(32, 180, 10, 180, 0, 0, 0, 1400, 1) with pytest.warns(pvlibDeprecationWarning): irradiance.globalinplane(0, 1000, 100, 10)
def test_globalinplane(): aoi = irradiance.aoi(40, 180, ephem_data['apparent_zenith'], ephem_data['apparent_azimuth']) airmass = atmosphere.relativeairmass(ephem_data['apparent_zenith']) gr_sand = irradiance.grounddiffuse(40, ghi, surface_type='sand') diff_perez = irradiance.perez( 40, 180, irrad_data['dhi'], irrad_data['dni'], dni_et, ephem_data['apparent_zenith'], ephem_data['apparent_azimuth'], airmass) irradiance.globalinplane( aoi=aoi, dni=irrad_data['dni'], poa_sky_diffuse=diff_perez, poa_ground_diffuse=gr_sand)
def test_globalinplane(): AOI = irradiance.aoi(40, 180, ephem_data['apparent_zenith'], ephem_data['apparent_azimuth']) AM = atmosphere.relativeairmass(ephem_data['apparent_zenith']) gr_sand = irradiance.grounddiffuse(40, ghi, surface_type='sand') diff_perez = irradiance.perez( 40, 180, irrad_data['DHI'], irrad_data['DNI'], dni_et, ephem_data['apparent_zenith'], ephem_data['apparent_azimuth'], AM) irradiance.globalinplane( AOI=AOI, DNI=irrad_data['DNI'], In_Plane_SkyDiffuse=diff_perez, GR=gr_sand)
def test_globalinplane(): aoi = irradiance.aoi(40, 180, ephem_data['apparent_zenith'], ephem_data['azimuth']) airmass = atmosphere.relativeairmass(ephem_data['apparent_zenith']) gr_sand = irradiance.grounddiffuse(40, ghi, surface_type='sand') diff_perez = irradiance.perez( 40, 180, irrad_data['dhi'], irrad_data['dni'], dni_et, ephem_data['apparent_zenith'], ephem_data['azimuth'], airmass) irradiance.globalinplane( aoi=aoi, dni=irrad_data['dni'], poa_sky_diffuse=diff_perez, poa_ground_diffuse=gr_sand)
def test_globalinplane(): AOI = irradiance.aoi(40, 180, ephem_data['apparent_zenith'], ephem_data['apparent_azimuth']) AM = atmosphere.relativeairmass(ephem_data['apparent_zenith']) gr_sand = irradiance.grounddiffuse(40, ghi, surface_type='sand') diff_perez = irradiance.perez(40, 180, irrad_data['DHI'], irrad_data['DNI'], dni_et, ephem_data['apparent_zenith'], ephem_data['apparent_azimuth'], AM) irradiance.globalinplane(AOI=AOI, DNI=irrad_data['DNI'], In_Plane_SkyDiffuse=diff_perez, GR=gr_sand)
# Compute the diffuse irradiance on the panel, reflected from the ground: S_d_reflect = irradiance.grounddiffuse(surface_tilt, I_hor, albedo=0.25, surface_type=None) # Compute the diffuse irradiance on the panel, from the sky: S_d_sky = irradiance.klucher(surface_tilt, surface_azimuth, I_d_hor, I_hor, ephem_data['zenith'], ephem_data['azimuth']) # Compute the angles between the panel and the sun: aoi = irradiance.aoi(surface_tilt, surface_azimuth, ephem_data['zenith'], ephem_data['azimuth']) # Compute the global irradiance on the panel: S = irradiance.globalinplane(aoi, DNI, S_d_sky, S_d_reflect) # Second case: with tracking (axis is supposed to be north-south): S_track = tracking.singleaxis(ephem_data['apparent_zenith'], ephem_data['azimuth'], axis_tilt=0, axis_azimuth=0, max_angle=360, backtrack=True) S['Direct with tracking'] = DNI * np.cos(np.radians(S_track.aoi)) S = S.fillna(0) S.plot() #S.to_excel('data/incidentPV.xlsx')
def poa_tot(aoi, forecast_data, poa_sky_diffuse, poa_ground_diffuse): poa_irrad = irradiance.globalinplane(aoi, forecast_data['dni'], poa_sky_diffuse, poa_ground_diffuse) return (poa_irrad)