@@ -225,65 +225,54 @@ def adr_wrapper(xdata, *params):
225225 return popt
226226
227227
228- def _infer_k_huld (cell_type , pdc0 ):
229- # from PVGIS documentation, "PVGIS data sources & calculation methods",
230- # Section 5.2.3, accessed 12/22/2023
231- # The parameters in PVGIS' documentation are for a version of Huld's
232- # equation that has factored Pdc0 out of the polynomial:
233- # P = G/1000 * Pdc0 * (1 + k1 log(Geff) + ...) so these parameters are
234- # multiplied by pdc0
235- huld_params = {'csi' : (- 0.017237 , - 0.040465 , - 0.004702 , 0.000149 ,
236- 0.000170 , 0.000005 ),
237- 'cis' : (- 0.005554 , - 0.038724 , - 0.003723 , - 0.000905 ,
238- - 0.001256 , 0.000001 ),
239- 'cdte' : (- 0.046689 , - 0.072844 , - 0.002262 , 0.000276 ,
240- 0.000159 , - 0.000006 )}
241- k = tuple ([x * pdc0 for x in huld_params [cell_type .lower ()]])
242- return k
243-
244-
245- def _infer_k_huld_eu_jrc (cell_type , pdc0 ):
246- """
228+ def _infer_k_huld (cell_type , pdc0 , k_version ):
229+ r"""
247230 Get the EU JRC updated coefficients for the Huld model.
231+
248232 Parameters
249233 ----------
250234 cell_type : str
251235 Must be one of 'csi', 'cis', or 'cdte'
252236 pdc0 : numeric
253237 Power of the modules at reference conditions [W]
238+ k_version : str
239+ Either '2011' or '2025'.
240+
254241 Returns
255242 -------
256243 tuple
257244 The six coefficients (k1-k6) for the Huld model, scaled by pdc0
258- Notes
259- -----
260- These coefficients are from the EU JRC paper [1]_. The coefficients are
261- for the version of Huld's equation that has factored Pdc0 out of the
262- polynomial, so they are multiplied by pdc0 before being returned.
263- References
264- ----------
265- .. [1] EU JRC paper, "Updated coefficients for the Huld model",
266- https://doi.org/10.1002/pip.3926
267245 """
268- # Updated coefficients from EU JRC paper
269- huld_params = {'csi' : (- 0.017162 , - 0.040289 , - 0.004681 , 0.000148 ,
270- 0.000169 , 0.000005 ),
271- 'cis' : (- 0.005521 , - 0.038576 , - 0.003711 , - 0.000901 ,
272- - 0.001251 , 0.000001 ),
273- 'cdte' : (- 0.046477 , - 0.072509 , - 0.002252 , 0.000275 ,
274- 0.000158 , - 0.000006 )}
246+ # from PVGIS documentation, "PVGIS data sources & calculation methods",
247+ # Section 5.2.3, accessed 12/22/2023
248+ # The parameters in PVGIS' documentation are for a version of Huld's
249+ # equation that has factored Pdc0 out of the polynomial:
250+ # P = G/1000 * Pdc0 * (1 + k1 log(Geff) + ...) so these parameters are
251+ # multiplied by pdc0
252+ if k_version == '2011' :
253+ huld_params = {'csi' : (- 0.017237 , - 0.040465 , - 0.004702 , 0.000149 ,
254+ 0.000170 , 0.000005 ),
255+ 'cis' : (- 0.005554 , - 0.038724 , - 0.003723 , - 0.000905 ,
256+ - 0.001256 , 0.000001 ),
257+ 'cdte' : (- 0.046689 , - 0.072844 , - 0.002262 , 0.000276 ,
258+ 0.000159 , - 0.000006 )}
259+ elif k_version == '2025' :
260+ # Updated coefficients from EU JRC paper
261+ huld_params = {'csi' : (- 0.017162 , - 0.040289 , - 0.004681 , 0.000148 ,
262+ 0.000169 , 0.000005 ),
263+ 'cis' : (- 0.005521 , - 0.038576 , - 0.003711 , - 0.000901 ,
264+ - 0.001251 , 0.000001 ),
265+ 'cdte' : (- 0.046477 , - 0.072509 , - 0.002252 , 0.000275 ,
266+ 0.000158 , - 0.000006 )}
267+ else :
268+ raise ValueError (f'Invalid k_version={ k_version } : must be either '
269+ '"2011" or "2025"' )
275270 k = tuple ([x * pdc0 for x in huld_params [cell_type .lower ()]])
276271 return k
277272
278273
279- def huld (
280- effective_irradiance ,
281- temp_mod ,
282- pdc0 ,
283- k = None ,
284- cell_type = None ,
285- use_eu_jrc = False
286- ):
274+ def huld (effective_irradiance , temp_mod , pdc0 , k = None , cell_type = None ,
275+ k_version = None ):
287276 r"""
288277 Power (DC) using the Huld model.
289278
@@ -315,9 +304,10 @@ def huld(
315304 cell_type : str, optional
316305 If provided, must be one of ``'cSi'``, ``'CIS'``, or ``'CdTe'``.
317306 Used to look up default values for ``k`` if ``k`` is not specified.
318- use_eu_jrc : bool, default False
319- If True, use the updated coefficients from the EU JRC paper [2]_.
320- Only used if ``k`` is not provided and ``cell_type`` is specified.
307+ k_version : str, optional
308+ Either `'2011'` (default) or `'2025'`. Used to select default values
309+ for ``k`` if ``k`` is not specified. If `'2011'`, values from [1]_
310+ are used; if `'2025'` values are from [2]_.
321311
322312 Returns
323313 -------
@@ -372,19 +362,21 @@ def huld(
372362
373363 References
374364 ----------
375- .. [1] T. Huld, G. Friesen, A. Skoczek, R. Kenny, T. Sample, M. Field,
376- E. Dunlop. A power-rating model for crystalline silicon PV modules.
377- Solar Energy Materials and Solar Cells 95, (2011), pp. 3359-3369.
378- :doi:`10.1016/j.solmat.2011.07.026`.
379- .. [2] EU JRC paper, "Updated coefficients for the Huld model",
380- https://doi.org/10.1002/pip.3926
365+ .. [1] T. Huld, G. Friesen, A. Skoczek, R. Kenny, T. Sample, M. Field, and
366+ E. Dunlop, "A power-rating model for crystalline silicon PV
367+ modules," Solar Energy Materials and Solar Cells 95, (2011),
368+ pp. 3359-3369. :doi:`10.1016/j.solmat.2011.07.026`.
369+ .. [2] A. Chatzipanagi, N. Taylor, I. Suarez, A. Martinez, T. Lyubenova,
370+ and E. Dunlop, "An Updated Simplified Energy Yield Model for Recent
371+ Photovoltaic Module Technologies,"
372+ Progress in Photovoltaics: Research and Applications 33,
373+ no. 8 (2025): 905–917, :doi:`10.1002/pip.3926`.
381374 """
382375 if k is None :
383376 if cell_type is not None :
384- if use_eu_jrc :
385- k = _infer_k_huld_eu_jrc (cell_type , pdc0 )
386- else :
387- k = _infer_k_huld (cell_type , pdc0 )
377+ if k_version is None :
378+ k_version = '2011'
379+ k = _infer_k_huld (cell_type , pdc0 , k_version )
388380 else :
389381 raise ValueError ('Either k or cell_type must be specified' )
390382
0 commit comments