pvlib-python icon indicating copy to clipboard operation
pvlib-python copied to clipboard

ModelChain disregards diffuse optical losses for non-Sandia modules

Open ramaroesilva opened this issue 5 months ago • 2 comments

Is your feature request related to a problem? Please describe. modelchain.ModelChain and modelchain.ModelChain.with_pvwatts only consider optical losses for diffuse irradiance for modules from the Sandia Database, which contain an FD parameter for this. This can be seen in the effective_irradiance_model function in here.

def effective_irradiance_model(self): def _eff_irrad(module_parameters, total_irrad, spect_mod, aoi_mod): fd = module_parameters.get('FD', 1.) return spect_mod * (total_irrad['poa_direct'] * aoi_mod + fd * total_irrad['poa_diffuse'])

In my opinion, this is relevant for pvwatts approach. Not sure for more detailed approaches like single-diode model, etc.

Describe the solution you'd like pvlib already contains well-established functions to compute diffuse irradiance losses such as the Martin-Ruiz and Marion's models. Would "just" be a matter of implementing them in the modelchain workflow.

Additional context Even for Sandia modules, could it make sense to allow users to replace the FD constant by values from the Martin-Ruiz or Marion models?

ramaroesilva avatar Jul 28 '25 09:07 ramaroesilva

The original intent of methods like ModelChain.with_pvwatts was to execute the workflow used in PVWatts (or, pvlib's implementation of that sequence of functions). pvlib's choices are based on the outdated PVWatts v5 documentation. That documentation clear that PVWatts v5 used the physical AOI model, which doesn't account for diffuse reflections.

I'm not opposed to improving the AOI model portion of ModelChain to offer diffuse reflection as an option. But I think the with_xxx methods should be faithful to the documentation of the workflow they represent.

cwhanse avatar Jul 28 '25 14:07 cwhanse

That's a good point @cwhanse. Because I'm not familiar with PVWatts, I simply saw it as a way to model a PV system with a simpler, more abstract description, skipping the need for the modeller to choose a specific module, inverter, and modules interconnection.

But maybe I understood it wrong - since I've only recently started looking at ModelChain part of pvlib - and a standard ModelChain also allows this.

ramaroesilva avatar Jul 28 '25 14:07 ramaroesilva