@@ -42,19 +42,20 @@ def test_system():
4242
4343
4444def test__poa_ground_shadows ():
45- poa_ground , f_gnd_beam , df , vf_gnd_sky = (300. , 0.5 , 0.5 , 0.2 )
46- result = infinite_sheds ._poa_ground_shadows (
47- poa_ground , f_gnd_beam , df , vf_gnd_sky )
48- expected = 300. * (0.5 * 0.5 + 0.5 * 0.2 )
45+ ghi , dhi , albedo , f_gnd_beam , vf_gnd_sky = (300. , 100 , 0.3 , 0.5 , 0.2 )
46+ result = infinite_sheds ._poa_ground_shadows (ghi , dhi , albedo , f_gnd_beam ,
47+ vf_gnd_sky )
48+
49+ expected = 0.3 * (200 * 0.5 + 100 * 0.2 )
4950 assert np .isclose (result , expected )
5051 # vector inputs
51- poa_ground = np .array ([300. , 300. ])
52- f_gnd_beam = np .array ([0.5 , 0.5 ])
53- df = np .array ([0.5 , 0. ])
54- vf_gnd_sky = np .array ([0.2 , 0.2 ])
55- result = infinite_sheds ._poa_ground_shadows (
56- poa_ground , f_gnd_beam , df , vf_gnd_sky )
57- expected_vec = np .array ([expected , 300. * 0.5 ])
52+ ghi = np .array ([ghi , ghi ])
53+ dhi = np .array ([dhi , 0 ])
54+ f_gnd_beam = np .array ([f_gnd_beam , f_gnd_beam ])
55+ vf_gnd_sky = np .array ([vf_gnd_sky , vf_gnd_sky ])
56+ result = infinite_sheds ._poa_ground_shadows (ghi , dhi , albedo , f_gnd_beam ,
57+ vf_gnd_sky )
58+ expected_vec = np .array ([expected , 300. * 0.5 * 0.3 ])
5859 assert np .allclose (result , expected_vec )
5960
6061
0 commit comments