|
23 | 23 |
|
24 | 24 | # a dict of required parameter names for each DC power model |
25 | 25 | DC_MODEL_PARAMS = { |
26 | | - 'sapm' : set([ |
| 26 | + 'sapm': set([ |
27 | 27 | 'A0', 'A1', 'A2', 'A3', 'A4', 'B0', 'B1', 'B2', 'B3', |
28 | 28 | 'B4', 'B5', 'C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', |
29 | 29 | 'C7', 'Isco', 'Impo', 'Aisc', 'Aimp', 'Bvoco', |
30 | 30 | 'Mbvoc', 'Bvmpo', 'Mbvmp', 'N', 'Cells_in_Series', |
31 | 31 | 'IXO', 'IXXO', 'FD']), |
32 | | - 'desoto' : set([ |
| 32 | + 'desoto': set([ |
33 | 33 | 'alpha_sc', 'a_ref', 'I_L_ref', 'I_o_ref', |
34 | 34 | 'R_sh_ref', 'R_s']), |
35 | | - 'pvsyst' : set([ |
| 35 | + 'cec': set([ |
| 36 | + 'alpha_sc', 'a_ref', 'I_L_ref', 'I_o_ref', |
| 37 | + 'R_sh_ref', 'R_s', 'Adjust']), |
| 38 | + 'pvsyst': set([ |
36 | 39 | 'gamma_ref', 'mu_gamma', 'I_L_ref', 'I_o_ref', |
37 | 40 | 'R_sh_ref', 'R_sh_0', 'R_s', 'alpha_sc', 'EgRef', |
38 | 41 | 'cells_in_series']), |
39 | | - 'singlediode' : set([ |
| 42 | + 'singlediode': set([ |
40 | 43 | 'alpha_sc', 'a_ref', 'I_L_ref', 'I_o_ref', |
41 | 44 | 'R_sh_ref', 'R_s']), |
42 | | - 'pvwatts' : set(['pdc0', 'gamma_pdc']) |
| 45 | + 'pvwatts': set(['pdc0', 'gamma_pdc']) |
43 | 46 | } |
44 | 47 |
|
45 | 48 |
|
@@ -336,6 +339,35 @@ def calcparams_desoto(self, effective_irradiance, temp_cell, **kwargs): |
336 | 339 |
|
337 | 340 | return calcparams_desoto(effective_irradiance, temp_cell, **kwargs) |
338 | 341 |
|
| 342 | + def calcparams_cec(self, effective_irradiance, temp_cell, **kwargs): |
| 343 | + """ |
| 344 | + Use the :py:func:`calcparams_cec` function, the input |
| 345 | + parameters and ``self.module_parameters`` to calculate the |
| 346 | + module currents and resistances. |
| 347 | +
|
| 348 | + Parameters |
| 349 | + ---------- |
| 350 | + effective_irradiance : numeric |
| 351 | + The irradiance (W/m2) that is converted to photocurrent. |
| 352 | +
|
| 353 | + temp_cell : float or Series |
| 354 | + The average cell temperature of cells within a module in C. |
| 355 | +
|
| 356 | + **kwargs |
| 357 | + See pvsystem.calcparams_cec for details |
| 358 | +
|
| 359 | + Returns |
| 360 | + ------- |
| 361 | + See pvsystem.calcparams_cec for details |
| 362 | + """ |
| 363 | + |
| 364 | + kwargs = _build_kwargs(['a_ref', 'I_L_ref', 'I_o_ref', 'R_sh_ref', |
| 365 | + 'R_s', 'alpha_sc', 'Adjust', 'EgRef', 'dEgdT', |
| 366 | + 'irrad_ref', 'temp_ref'], |
| 367 | + self.module_parameters) |
| 368 | + |
| 369 | + return calcparams_cec(effective_irradiance, temp_cell, **kwargs) |
| 370 | + |
339 | 371 | def calcparams_pvsyst(self, effective_irradiance, temp_cell): |
340 | 372 | """ |
341 | 373 | Use the :py:func:`calcparams_pvsyst` function, the input |
@@ -1223,6 +1255,122 @@ def calcparams_desoto(effective_irradiance, temp_cell, |
1223 | 1255 | return IL, I0, Rs, Rsh, nNsVth |
1224 | 1256 |
|
1225 | 1257 |
|
| 1258 | +def calcparams_cec(effective_irradiance, temp_cell, |
| 1259 | + alpha_sc, a_ref, I_L_ref, I_o_ref, R_sh_ref, R_s, |
| 1260 | + Adjust, EgRef=1.121, dEgdT=-0.0002677, |
| 1261 | + irrad_ref=1000, temp_ref=25): |
| 1262 | + ''' |
| 1263 | + Calculates five parameter values for the single diode equation at |
| 1264 | + effective irradiance and cell temperature using the CEC |
| 1265 | + model described in [1]. The CEC model differs from the De soto et al. |
| 1266 | + model [3] by the parameter Adjust. The five values returned by |
| 1267 | + calcparams_cec can be used by singlediode to calculate an IV curve. |
| 1268 | +
|
| 1269 | + Parameters |
| 1270 | + ---------- |
| 1271 | + effective_irradiance : numeric |
| 1272 | + The irradiance (W/m2) that is converted to photocurrent. |
| 1273 | +
|
| 1274 | + temp_cell : numeric |
| 1275 | + The average cell temperature of cells within a module in C. |
| 1276 | +
|
| 1277 | + alpha_sc : float |
| 1278 | + The short-circuit current temperature coefficient of the |
| 1279 | + module in units of A/C. |
| 1280 | +
|
| 1281 | + a_ref : float |
| 1282 | + The product of the usual diode ideality factor (n, unitless), |
| 1283 | + number of cells in series (Ns), and cell thermal voltage at reference |
| 1284 | + conditions, in units of V. |
| 1285 | +
|
| 1286 | + I_L_ref : float |
| 1287 | + The light-generated current (or photocurrent) at reference conditions, |
| 1288 | + in amperes. |
| 1289 | +
|
| 1290 | + I_o_ref : float |
| 1291 | + The dark or diode reverse saturation current at reference conditions, |
| 1292 | + in amperes. |
| 1293 | +
|
| 1294 | + R_sh_ref : float |
| 1295 | + The shunt resistance at reference conditions, in ohms. |
| 1296 | +
|
| 1297 | + R_s : float |
| 1298 | + The series resistance at reference conditions, in ohms. |
| 1299 | +
|
| 1300 | + Adjust : float |
| 1301 | + The adjustment to the temperature coefficient for short circuit |
| 1302 | + current, in percent |
| 1303 | +
|
| 1304 | + EgRef : float |
| 1305 | + The energy bandgap at reference temperature in units of eV. |
| 1306 | + 1.121 eV for crystalline silicon. EgRef must be >0. For parameters |
| 1307 | + from the SAM CEC module database, EgRef=1.121 is implicit for all |
| 1308 | + cell types in the parameter estimation algorithm used by NREL. |
| 1309 | +
|
| 1310 | + dEgdT : float |
| 1311 | + The temperature dependence of the energy bandgap at reference |
| 1312 | + conditions in units of 1/K. May be either a scalar value |
| 1313 | + (e.g. -0.0002677 as in [3]) or a DataFrame (this may be useful if |
| 1314 | + dEgdT is a modeled as a function of temperature). For parameters from |
| 1315 | + the SAM CEC module database, dEgdT=-0.0002677 is implicit for all cell |
| 1316 | + types in the parameter estimation algorithm used by NREL. |
| 1317 | +
|
| 1318 | + irrad_ref : float (optional, default=1000) |
| 1319 | + Reference irradiance in W/m^2. |
| 1320 | +
|
| 1321 | + temp_ref : float (optional, default=25) |
| 1322 | + Reference cell temperature in C. |
| 1323 | +
|
| 1324 | + Returns |
| 1325 | + ------- |
| 1326 | + Tuple of the following results: |
| 1327 | +
|
| 1328 | + photocurrent : numeric |
| 1329 | + Light-generated current in amperes |
| 1330 | +
|
| 1331 | + saturation_current : numeric |
| 1332 | + Diode saturation curent in amperes |
| 1333 | +
|
| 1334 | + resistance_series : float |
| 1335 | + Series resistance in ohms |
| 1336 | +
|
| 1337 | + resistance_shunt : numeric |
| 1338 | + Shunt resistance in ohms |
| 1339 | +
|
| 1340 | + nNsVth : numeric |
| 1341 | + The product of the usual diode ideality factor (n, unitless), |
| 1342 | + number of cells in series (Ns), and cell thermal voltage at |
| 1343 | + specified effective irradiance and cell temperature. |
| 1344 | +
|
| 1345 | + References |
| 1346 | + ---------- |
| 1347 | + [1] A. Dobos, "An Improved Coefficient Calculator for the California |
| 1348 | + Energy Commission 6 Parameter Photovoltaic Module Model", Journal of |
| 1349 | + Solar Energy Engineering, vol 134, 2012. |
| 1350 | +
|
| 1351 | + [2] System Advisor Model web page. https://sam.nrel.gov. |
| 1352 | +
|
| 1353 | + [3] W. De Soto et al., "Improvement and validation of a model for |
| 1354 | + photovoltaic array performance", Solar Energy, vol 80, pp. 78-88, |
| 1355 | + 2006. |
| 1356 | +
|
| 1357 | + See Also |
| 1358 | + -------- |
| 1359 | + calcparams_desoto |
| 1360 | + singlediode |
| 1361 | + retrieve_sam |
| 1362 | +
|
| 1363 | + ''' |
| 1364 | + |
| 1365 | + # pass adjusted temperature coefficient to desoto |
| 1366 | + return calcparams_desoto(effective_irradiance, temp_cell, |
| 1367 | + alpha_sc*(1.0 - Adjust/100), |
| 1368 | + a_ref, I_L_ref, I_o_ref, |
| 1369 | + R_sh_ref, R_s, |
| 1370 | + EgRef=1.121, dEgdT=-0.0002677, |
| 1371 | + irrad_ref=1000, temp_ref=25) |
| 1372 | + |
| 1373 | + |
1226 | 1374 | def calcparams_pvsyst(effective_irradiance, temp_cell, |
1227 | 1375 | alpha_sc, gamma_ref, mu_gamma, |
1228 | 1376 | I_L_ref, I_o_ref, |
|
0 commit comments