|
27 | 27 | # a dict of required parameter names for each DC power model |
28 | 28 | _DC_MODEL_PARAMS = { |
29 | 29 | 'sapm': { |
30 | | - 'C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', |
| 30 | + # i_x and i_xx params (IXO, IXXO, C4-C7) not required |
| 31 | + 'C0', 'C1', 'C2', 'C3', |
31 | 32 | 'Isco', 'Impo', 'Voco', 'Vmpo', 'Aisc', 'Aimp', 'Bvoco', |
32 | | - 'Mbvoc', 'Bvmpo', 'Mbvmp', 'N', 'Cells_in_Series', |
33 | | - 'IXO', 'IXXO'}, |
| 33 | + 'Mbvoc', 'Bvmpo', 'Mbvmp', 'N', 'Cells_in_Series'}, |
34 | 34 | 'desoto': { |
35 | 35 | 'alpha_sc', 'a_ref', 'I_L_ref', 'I_o_ref', |
36 | 36 | 'R_sh_ref', 'R_s'}, |
@@ -2229,9 +2229,11 @@ def sapm(effective_irradiance, temp_cell, module, *, temperature_ref=25, |
2229 | 2229 | * v_mp : Voltage at maximum-power point (V) |
2230 | 2230 | * p_mp : Power at maximum-power point (W) |
2231 | 2231 | * i_x : Current at module V = 0.5Voc, defines 4th point on I-V |
2232 | | - curve for modeling curve shape |
| 2232 | + curve for modeling curve shape. Omitted if ``IXO``, ``C4``, and |
| 2233 | + ``C5`` parameters are not supplied. |
2233 | 2234 | * i_xx : Current at module V = 0.5(Voc+Vmp), defines 5th point on |
2234 | | - I-V curve for modeling curve shape |
| 2235 | + I-V curve for modeling curve shape. Omitted if ``IXXO``, ``C6``, |
| 2236 | + and ``C7`` parameters are not supplied. |
2235 | 2237 |
|
2236 | 2238 | Notes |
2237 | 2239 | ----- |
@@ -2335,13 +2337,15 @@ def sapm(effective_irradiance, temp_cell, module, *, temperature_ref=25, |
2335 | 2337 |
|
2336 | 2338 | out['p_mp'] = out['i_mp'] * out['v_mp'] |
2337 | 2339 |
|
2338 | | - out['i_x'] = ( |
2339 | | - module['IXO'] * (module['C4']*Ee + module['C5']*(Ee**2)) * |
2340 | | - (1 + module['Aisc']*(temp_cell - temperature_ref))) |
| 2340 | + if 'IXO' in module and 'C4' in module and 'C5' in module: |
| 2341 | + out['i_x'] = ( |
| 2342 | + module['IXO'] * (module['C4']*Ee + module['C5']*(Ee**2)) * |
| 2343 | + (1 + module['Aisc']*(temp_cell - temperature_ref))) |
2341 | 2344 |
|
2342 | | - out['i_xx'] = ( |
2343 | | - module['IXXO'] * (module['C6']*Ee + module['C7']*(Ee**2)) * |
2344 | | - (1 + module['Aimp']*(temp_cell - temperature_ref))) |
| 2345 | + if 'IXXO' in module and 'C6' in module and 'C7' in module: |
| 2346 | + out['i_xx'] = ( |
| 2347 | + module['IXXO'] * (module['C6']*Ee + module['C7']*(Ee**2)) * |
| 2348 | + (1 + module['Aimp']*(temp_cell - temperature_ref))) |
2345 | 2349 |
|
2346 | 2350 | if isinstance(out['i_sc'], pd.Series): |
2347 | 2351 | out = pd.DataFrame(out) |
|
0 commit comments