@@ -386,6 +386,12 @@ def run_model(self, times, irradiance=None, weather=None):
386
386
self .airmass ['airmass_absolute' ],
387
387
self .aoi )
388
388
389
+ voltages = ['v_mp' , 'v_oc' ]
390
+ self .dc [voltages ] *= self .system .series_modules
391
+ currents = ['i_mp' , 'i_sc' , 'i_x' , 'i_xx' ]
392
+ self .dc [currents ] *= self .system .parallel_modules
393
+ self .dc ['p_mp' ] = self .dc ['v_mp' ] * self .dc ['i_mp' ]
394
+
389
395
self .ac = self .system .snlinverter (self .dc ['v_mp' ], self .dc ['p_mp' ])
390
396
391
397
return self
@@ -425,13 +431,19 @@ def run_model(self, times, irradiance=None, weather=None):
425
431
426
432
self .prepare_inputs (times , irradiance , weather )
427
433
428
- self .temps = self .system .sapm_celltemp (self .total_irrad ['poa_global' ],
429
- self .weather ['wind_speed' ],
430
- self .weather ['temp_air' ])
434
+ self .aoi_mod = self .system .ashraeiam (self .aoi ).fillna (0 )
435
+ self .total_irrad ['poa_global_aoi' ] = (
436
+ self .total_irrad ['poa_direct' ] * self .aoi_mod +
437
+ self .total_irrad ['poa_diffuse' ])
438
+
439
+ self .temps = self .system .sapm_celltemp (
440
+ self .total_irrad ['poa_global_aoi' ],
441
+ self .weather ['wind_speed' ],
442
+ self .weather ['temp_air' ])
431
443
432
444
(photocurrent , saturation_current , resistance_series ,
433
445
resistance_shunt , nNsVth ) = (
434
- self .system .calcparams_desoto (self .total_irrad ['poa_global ' ],
446
+ self .system .calcparams_desoto (self .total_irrad ['poa_global_aoi ' ],
435
447
self .temps ['temp_cell' ]))
436
448
437
449
self .desoto = (photocurrent , saturation_current , resistance_series ,
@@ -441,6 +453,14 @@ def run_model(self, times, irradiance=None, weather=None):
441
453
photocurrent , saturation_current , resistance_series ,
442
454
resistance_shunt , nNsVth )
443
455
456
+ self .dc = self .dc .fillna (0 )
457
+
458
+ voltages = ['v_mp' , 'v_oc' ]
459
+ self .dc [voltages ] *= self .system .series_modules
460
+ currents = ['i_mp' , 'i_sc' , 'i_x' , 'i_xx' ]
461
+ self .dc [currents ] *= self .system .parallel_modules
462
+ self .dc ['p_mp' ] = self .dc ['v_mp' ] * self .dc ['i_mp' ]
463
+
444
464
self .ac = self .system .snlinverter (self .dc ['v_mp' ], self .dc ['p_mp' ])
445
465
446
466
return self
0 commit comments