Skip to content

Adds faiman_rad and ross models to get_cell_temperature().#2631

Open
ramaroesilva wants to merge 26 commits intopvlib:mainfrom
ramaroesilva:pvsystem-temp-models
Open

Adds faiman_rad and ross models to get_cell_temperature().#2631
ramaroesilva wants to merge 26 commits intopvlib:mainfrom
ramaroesilva:pvsystem-temp-models

Conversation

@ramaroesilva
Copy link
Copy Markdown
Contributor

@ramaroesilva ramaroesilva commented Dec 18, 2025

Differently from what was originally discussed with @cwhanse and @echedey-ls, I decided not to include a verification on whether both k and noct are provided within get_cell_temperature. imo, this type of verification should be (and is) done within the temperature.ross function itself and we see that the opposite situation - expected parameters not being provided - is never verified within get_cell_temperature as I imagine it is done within each temperature model function.

@cwhanse about wind and ross model, if that's okay I still included a small note in the wind_speed description to alert ross users that providing a None is enough.

@ramaroesilva
Copy link
Copy Markdown
Contributor Author

ramaroesilva commented Dec 21, 2025

Have included tests for the added temperature models.

@adriesse, for the faiman_rad case could you suggest one set of example ir_down/u0/y1 values for testing? I'm asking this because of this note on the faiman_rad docstring:

When only irradiance, air temperature and wind speed inputs are provided (ir_down is None) this function calculates the same device temperature as the original faiman model. When down-welling long-wave radiation data are provided as well (ir_down is not None) the default u0 and u1 values from the original model should not be used because a portion of the radiative losses would be double-counted.

Afterwards, I can get the expected output by running pvlib.temperature.faiman_rad for poa_global=1000, temp_air=25, wind_speed=1, and your recommended parameter values.

@adriesse
Copy link
Copy Markdown
Member

Have included tests for the added temperature models.

@adriesse, for the faiman_rad case could you suggest one set of example ir_down/u0/y1 values for testing? I'm asking this because of this note on the faiman_rad docstring:

When only irradiance, air temperature and wind speed inputs are provided (ir_down is None) this function calculates the same device temperature as the original faiman model. When down-welling long-wave radiation data are provided as well (ir_down is not None) the default u0 and u1 values from the original model should not be used because a portion of the radiative losses would be double-counted.

Afterwards, I can get the expected output by running pvlib.temperature.faiman_rad for poa_global=1000, temp_air=25, wind_speed=1, and your recommended parameter values.

For the test it doesn't really matter what the values are, and what you've done seems fine. Not sure if you want to keep ir_down a scalar as discussed above. In practice the reduction in U values will depend on the ir_down conditions at the location.

Copy link
Copy Markdown
Member

@cwhanse cwhanse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ramaroesilva this fell off my radar, sorry. I don't have an opinion about the ross wind_speed accommodation. The if structure is OK with me, it's easy for a functools novice to understand :)

@kandersolar kandersolar added this to the v0.14.1 milestone Jan 17, 2026
@kandersolar kandersolar modified the milestones: v0.14.1, v0.15.1 Jan 26, 2026
@cwhanse
Copy link
Copy Markdown
Member

cwhanse commented Feb 22, 2026

@adriesse @kandersolar nudging you if you wanted to look at this lingering PR again.

Copy link
Copy Markdown
Member

@kandersolar kandersolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few final comments.

@adriesse
Copy link
Copy Markdown
Member

@adriesse @kandersolar nudging you if you wanted to look at this lingering PR again.

I'm not familiar with the PVSystem class.

cwhanse and others added 4 commits March 31, 2026 15:49
Co-authored-by: Echedey Luis <80125792+echedey-ls@users.noreply.github.com>
Co-authored-by: Kevin Anderson <kevin.anderso@gmail.com>
@cwhanse
Copy link
Copy Markdown
Member

cwhanse commented Mar 31, 2026

@kandersolar @echedey-ls please take at look at this clean up

Copy link
Copy Markdown
Member

@kandersolar kandersolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's name the parameter longwave_down instead of ir_down, towards #2653

@cwhanse
Copy link
Copy Markdown
Member

cwhanse commented Apr 1, 2026

ugh - something about end of line characters and now every line in pvsystem.py is marked as changed. Reverting, I'll replace ir_down with longwave_down manually.

@cwhanse cwhanse force-pushed the pvsystem-temp-models branch from ef2f7b4 to d55cf78 Compare April 1, 2026 16:49
self.temperature_model_parameters)
elif model == 'faiman_rad':
func = functools.partial(temperature.faiman_rad,
longwave_down=longwave_down)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
longwave_down=longwave_down)
ir_down=longwave_down)

We haven't renamed the parameter name in temperature.faiman_rad yet

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took me an iteration to understand this

@cwhanse
Copy link
Copy Markdown
Member

cwhanse commented Apr 1, 2026

@kandersolar replacing ir_down with longwave_down is a breaking change for temperature.faiman_rad. Was that intentional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pvlib.pvsystem.Array.get_cell_temperature does not accept ross and faiman_rad models

5 participants