Skip to content

Add minus sign in front of dEgdT, sdm.py #2322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/sphinx/source/whatsnew/v0.11.2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Bug fixes
~~~~~~~~~
* :py:func:`~pvlib.spa.julian_day_dt` now accounts for the 10 day difference
between Julian and Gregorian calendars prior to the year 1582. (:issue:`2077`, :pull:`2249`)
* Corrected sign of temperature coefficient ``dEgdT`` in :py:func:`~pvlib.pvsystem.fit_desoto_sandia`.
Results may differ slightly from previous versions. (:issue:`2311`, :pull:`2322`)

Documentation
~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion pvlib/ivtools/sdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ def fun_rsh(x, rshexp, ee, e0, rsh):
params['R_sh_exp'] = R_sh_exp

elif model == 'desoto':
dEgdT = 0.0002677
dEgdT = -0.0002677
x_for_io = const['q'] / const['k'] * (
1. / tok - 1. / tck[u] + dEgdT * (tc[u] - const['T0']) / tck[u])

Expand Down
3 changes: 3 additions & 0 deletions pvlib/tests/ivtools/test_sdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ def test_fit_desoto_sandia(cec_params_cansol_cs5p_220p):
expected = pd.Series(params)
assert np.allclose(modeled[params.keys()].values,
expected[params.keys()].values, rtol=5e-2)
assert_allclose(result['dEgdT'], -0.0002677)
assert_allclose(result['EgRef'], 1.3112547292120638)
assert_allclose(result['cells_in_series'], specs['cells_in_series'])


def _read_iv_curves_for_test(datafile, npts):
Expand Down
Loading