Possibility of beam irradiance from behind plane of array

Open Beginner friendly
#2,903 5 comments 2 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

  • #2913 by @Noumenon-ai — closed without merging

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
data

Research direction

Start with poa_components() and inspect beam_component() for the same clipping order. Locate the existing irradiance-component tests and add coverage for negative DNI when aoi >= 90; done means both paths return zero beam irradiance while existing positive-angle behavior remains intact.

Written by the indexing model from the issue text.

Description

bug

Describe the bug
The function poa_components() contains the following line:

 poa_direct = np.maximum(dni * np.cos(np.radians(aoi)), 0)

This usually works, but is not correct because it is the cosine that should be clipped, not the product. When using raw DNI measurements negative values are sometimes present, and these could produce a very small positive poa_direct when the sun is behind the plane of array.

Expected behavior

poa_direct is always zero when aoi >= 90.

Possible solution:

poa_direct = dni * np.maximum(np.cos(np.radians(aoi)), 0)

Additional context

The function beam_component() appears to have the same problem.

Dominant language
Python
Stars
1.7k
Forks
1.2k
Avg merge
3d 4h
Merged PRs (30d)
8

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pvlib/pvlib-python

All issues in pvlib/pvlib-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.