Skip to content

pvlib.soiling.hsu model implementation errors #970

@jsstein

Description

@jsstein

Describe the bug
I ran an example run using the Matlab version of the HSU soiling function and found that the python version did not give anywhere near the same results. The Matlab results matched the results in the original JPV paper. As a result of this test, I found two errors in the python implementation, which are listed below:

  1. depo_veloc = {'2_5': 0.004, '10': 0.0009} has the wrong default values. They are reversed.
    The proper dictionary should be: {'2_5': 0.0009, '10': 0.004}. This is confirmed in the JPV paper and the Matlab version of the function.

  2. The horiz_mass_rate is in g/(m^2hr) but should be in g/(m^2s). The line needs to be multiplied by 60x60 or 3600.
    The proper line of code should be:
    horiz_mass_rate = (pm2_5 * depo_veloc['2_5']+ np.maximum(pm10 - pm2_5, 0.) * depo_veloc['10'])*3600

When I made these changes I was able to match the validation dataset from the JPV paper, as shown below.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions