Skip to content

Commit 0e9ba3e

Browse files
committed
use scaling method in SingleDiode
1 parent 6858250 commit 0e9ba3e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pvlib/modelchain.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def basic_chain(times, latitude, longitude,
4444
Use decimal degrees notation.
4545
4646
module_parameters : None, dict or Series
47-
Module parameters as defined by the SAPM, CEC, or other.
47+
Module parameters as defined by the SAPM.
4848
4949
inverter_parameters : None, dict or Series
5050
Inverter parameters as defined by the CEC.
@@ -375,6 +375,7 @@ class SAPM(ModelChain):
375375
"""
376376
Uses the SAPM to calculate cell temperature, DC power and AC power.
377377
"""
378+
378379
def run_model(self, times, irradiance=None, weather=None):
379380
"""
380381
Run the model.
@@ -477,11 +478,7 @@ def run_model(self, times, irradiance=None, weather=None):
477478

478479
self.dc = self.dc.fillna(0)
479480

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']
481+
self.dc = self.system.scale_voltage_current_power(self.dc)
485482

486483
self.ac = self.system.snlinverter(self.dc['v_mp'], self.dc['p_mp'])
487484

0 commit comments

Comments
 (0)