-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Adds faiman_rad and ross models to get_cell_temperature(). #2631
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
base: main
Are you sure you want to change the base?
Changes from 13 commits
4143e2a
70bb948
acc43b4
69c7f43
5998725
61e8163
22f94a7
aaa52e3
c6d8ab9
78eb4c3
402b53c
9461e01
9035066
6f5bc0d
a536cb2
bc62578
7612e56
534e2f6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -46,6 +46,8 @@ Enhancements | |||||
| MERRA-2 reanalysis data. (:pull:`2572`) | ||||||
| * Add :py:func:`~pvlib.spectrum.spectral_factor_polo`, a function for estimating | ||||||
| spectral mismatch factors for vertical PV façades. (:issue:`2406`, :pull:`2491`) | ||||||
| * Includes `ross` and `faiman_rad` in the allowed models within | ||||||
| `pvlib.pvsystem.PVSystem.get_cell_temperature` (:issue:`2625`, :pull:`2631`) | ||||||
|
||||||
| `pvlib.pvsystem.PVSystem.get_cell_temperature` (:issue:`2625`, :pull:`2631`) | |
| :py:meth:`pvlib.pvsystem.PVSystem.get_cell_temperature` (:issue:`2625`, :pull:`2631`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -431,7 +431,8 @@ def get_cell_temperature(self, poa_global, temp_air, wind_speed, model, | |
|
|
||
| model : str | ||
| Supported models include ``'sapm'``, ``'pvsyst'``, | ||
| ``'faiman'``, ``'fuentes'``, and ``'noct_sam'`` | ||
| ``'faiman'``, ``'faiman_rad'``, ``'fuentes'``, ``'noct_sam'``, | ||
| and ``'ross'`` | ||
|
|
||
| effective_irradiance : numeric or tuple of numeric, optional | ||
| The irradiance that is converted to photocurrent in W/m^2. | ||
|
|
@@ -1217,11 +1218,12 @@ def get_cell_temperature(self, poa_global, temp_air, wind_speed, model, | |
| Ambient dry bulb temperature [C] | ||
|
|
||
| wind_speed : numeric | ||
| Wind speed [m/s] | ||
| Wind speed [m/s], although can be ``None`` for ``'ross'`` model | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we add this to the corresponding
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you mean within the function below?
|
||
|
|
||
| model : str | ||
| Supported models include ``'sapm'``, ``'pvsyst'``, | ||
| ``'faiman'``, ``'fuentes'``, and ``'noct_sam'`` | ||
| ``'faiman'``, ``'faiman_rad'``, ``'fuentes'``, ``'noct_sam'``, | ||
| and ``'ross'`` | ||
|
|
||
| effective_irradiance : numeric, optional | ||
| The irradiance that is converted to photocurrent in W/m^2. | ||
|
|
@@ -1235,8 +1237,9 @@ def get_cell_temperature(self, poa_global, temp_air, wind_speed, model, | |
| See Also | ||
| -------- | ||
| pvlib.temperature.sapm_cell, pvlib.temperature.pvsyst_cell, | ||
| pvlib.temperature.faiman, pvlib.temperature.fuentes, | ||
| pvlib.temperature.noct_sam | ||
| pvlib.temperature.faiman, pvlib.temperature.faiman_rad, | ||
| pvlib.temperature.fuentes, pvlib.temperature.noct_sam, | ||
| pvlib.temperature.ross | ||
|
|
||
| Notes | ||
| ----- | ||
|
|
@@ -1267,6 +1270,12 @@ def get_cell_temperature(self, poa_global, temp_air, wind_speed, model, | |
| required = tuple() | ||
| optional = _build_kwargs(['u0', 'u1'], | ||
| self.temperature_model_parameters) | ||
| elif model == 'faiman_rad': | ||
| func = temperature.faiman_rad | ||
| required = () | ||
| optional = _build_kwargs(['ir_down', 'u0', 'u1', | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're totally right. Already handled this in my latest commits. Thanks! |
||
| 'sky_view', 'emissivity'], | ||
| self.temperature_model_parameters) | ||
| elif model == 'fuentes': | ||
| func = temperature.fuentes | ||
| required = _build_tcell_args(['noct_installed']) | ||
|
|
@@ -1283,11 +1292,21 @@ def get_cell_temperature(self, poa_global, temp_air, wind_speed, model, | |
| optional = _build_kwargs(['transmittance_absorptance', | ||
| 'array_height', 'mount_standoff'], | ||
| self.temperature_model_parameters) | ||
| elif model == 'ross': | ||
| func = temperature.ross | ||
| required = () | ||
| # either noct or k must be defined | ||
| optional = _build_kwargs(['noct', 'k'], | ||
| self.temperature_model_parameters) | ||
| else: | ||
| raise ValueError(f'{model} is not a valid cell temperature model') | ||
|
|
||
| temperature_cell = func(poa_global, temp_air, wind_speed, | ||
| *required, **optional) | ||
| if model == 'ross': | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Although wind speed was kept as an input requested by
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cwhanse @echedey-ls this and the
|
||
| temperature_cell = func(poa_global, temp_air, | ||
| *required, **optional) | ||
| else: | ||
| temperature_cell = func(poa_global, temp_air, wind_speed, | ||
| *required, **optional) | ||
| return temperature_cell | ||
|
|
||
| def dc_ohms_from_percent(self): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done