File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -2646,3 +2646,27 @@ def test_max_power_point_mismatched(inputs):
2646
2646
)
2647
2647
2648
2648
print (result )
2649
+
2650
+ def test_max_power_point_mismatched_error ():
2651
+ """
2652
+ Test errored max power point computation for mismatched devices in series.
2653
+ """
2654
+ photocurrent = - 6.2
2655
+ saturation_current = 1.0e-8
2656
+ resistance_series = 0.0001
2657
+ resistance_shunt = 5000.0
2658
+ q_C = scipy .constants .value ("elementary charge" )
2659
+ k_B_J_per_K = scipy .constants .value ("Boltzmann constant" )
2660
+ T_K = scipy .constants .convert_temperature (25.0 , "Celsius" , "Kelvin" )
2661
+ nNsVth = 1.1 * 60 * k_B_J_per_K * T_K / q_C
2662
+
2663
+ with pytest .raises (ValueError ) as e_info :
2664
+ pvsystem .max_power_point_mismatched (
2665
+ photocurrent ,
2666
+ saturation_current ,
2667
+ resistance_series ,
2668
+ resistance_shunt ,
2669
+ nNsVth ,
2670
+ )
2671
+
2672
+ print (e_info )
You can’t perform that action at this time.
0 commit comments