Skip to content

Commit c89af6a

Browse files
committed
Refactor numerical precision test
To avoid using module parameters from SAM module database, as parameters there may change with future updates.
1 parent 7d8532a commit c89af6a

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

pvlib/test/test_numerical_precision.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,19 @@
3232
DATA_PATH = os.path.join(PVLIB_PATH, 'data', TEST_DATA)
3333
POA = 888
3434
TCELL = 55
35-
CECMOD = pvsystem.retrieve_sam('cecmod')
36-
# get module from cecmod and apply temp/irrad desoto corrections
37-
SPR_E20_327 = CECMOD.SunPower_SPR_E20_327
35+
# module parameters from CEC module SunPower SPR-E20-327
36+
SPR_E20_327 = {
37+
'alpha_sc': 0.004522,
38+
'a_ref': 2.6868,
39+
'I_L_ref': 6.468,
40+
'I_o_ref': 1.88e-10,
41+
'R_s': 0.37,
42+
'R_sh_ref': 298.13,
43+
}
44+
# apply temp/irrad desoto corrections
3845
ARGS = pvsystem.calcparams_desoto(
3946
effective_irradiance=POA, temp_cell=TCELL,
40-
alpha_sc=SPR_E20_327.alpha_sc, a_ref=SPR_E20_327.a_ref,
41-
I_L_ref=SPR_E20_327.I_L_ref, I_o_ref=SPR_E20_327.I_o_ref,
42-
R_sh_ref=SPR_E20_327.R_sh_ref, R_s=SPR_E20_327.R_s,
43-
EgRef=1.121, dEgdT=-0.0002677
47+
EgRef=1.121, dEgdT=-0.0002677, **SPR_E20_327,
4448
)
4549
IL, I0, RS, RSH, NNSVTH = ARGS
4650
IVCURVE_NPTS = 100

0 commit comments

Comments
 (0)