@@ -44,7 +44,7 @@ def basic_chain(times, latitude, longitude,
44
44
Use decimal degrees notation.
45
45
46
46
module_parameters : None, dict or Series
47
- Module parameters as defined by the SAPM.
47
+ Module parameters as defined by the SAPM, CEC, or other .
48
48
49
49
inverter_parameters : None, dict or Series
50
50
Inverter parameters as defined by the CEC.
@@ -213,10 +213,7 @@ class ModelChain(object):
213
213
"""
214
214
An experimental base class that represents all of the modeling steps
215
215
necessary for calculating power or energy for a PV system at a given
216
- location using the SAPM.
217
-
218
- CEC module specifications and the single diode model are not yet
219
- supported.
216
+ location.
220
217
221
218
Parameters
222
219
----------
@@ -456,13 +453,19 @@ def run_model(self, times, irradiance=None, weather=None):
456
453
457
454
self .prepare_inputs (times , irradiance , weather )
458
455
459
- self .temps = self .system .sapm_celltemp (self .total_irrad ['poa_global' ],
460
- self .weather ['wind_speed' ],
461
- self .weather ['temp_air' ])
456
+ self .aoi_mod = self .system .ashraeiam (self .aoi ).fillna (0 )
457
+ self .total_irrad ['poa_global_aoi' ] = (
458
+ self .total_irrad ['poa_direct' ] * self .aoi_mod +
459
+ self .total_irrad ['poa_diffuse' ])
460
+
461
+ self .temps = self .system .sapm_celltemp (
462
+ self .total_irrad ['poa_global_aoi' ],
463
+ self .weather ['wind_speed' ],
464
+ self .weather ['temp_air' ])
462
465
463
466
(photocurrent , saturation_current , resistance_series ,
464
467
resistance_shunt , nNsVth ) = (
465
- self .system .calcparams_desoto (self .total_irrad ['poa_global ' ],
468
+ self .system .calcparams_desoto (self .total_irrad ['poa_global_aoi ' ],
466
469
self .temps ['temp_cell' ]))
467
470
468
471
self .desoto = (photocurrent , saturation_current , resistance_series ,
@@ -472,6 +475,14 @@ def run_model(self, times, irradiance=None, weather=None):
472
475
photocurrent , saturation_current , resistance_series ,
473
476
resistance_shunt , nNsVth )
474
477
478
+ self .dc = self .dc .fillna (0 )
479
+
480
+ voltages = ['v_mp' , 'v_oc' ]
481
+ self .dc [voltages ] *= self .system .series_modules
482
+ currents = ['i_mp' , 'i_sc' , 'i_x' , 'i_xx' ]
483
+ self .dc [currents ] *= self .system .parallel_modules
484
+ self .dc ['p_mp' ] = self .dc ['v_mp' ] * self .dc ['i_mp' ]
485
+
475
486
self .ac = self .system .snlinverter (self .dc ['v_mp' ], self .dc ['p_mp' ])
476
487
477
488
return self
0 commit comments