Skip to content

Sign (negative) ignored for 1 axis tilt #1087

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

Closed
williamhobbs opened this issue Jul 6, 2022 · 2 comments · Fixed by NREL/ssc#885 or #1171
Closed

Sign (negative) ignored for 1 axis tilt #1087

williamhobbs opened this issue Jul 6, 2022 · 2 comments · Fixed by NREL/ssc#885 or #1171
Assignees
Labels

Comments

@williamhobbs
Copy link
Contributor

williamhobbs commented Jul 6, 2022

Describe the bug

If a user assigns a negative tilt for a 1 axis tracking system it appears to be treated as a positive tilt.

To Reproduce

Steps to reproduce the behavior:

  1. Start a detailed PV model
  2. In System Design, select "1 Axis" and assign a negative tilt value (e.g., -10)
  3. Simulate
  4. See the notice that describes the tilt as positive
  5. Compare results (energy, surface tilt and surface azimuth) with a similar case using a positive tilt and see that results are identical.

Expected behavior

One of the following, or similar:

  • Issue an error message about negative values being invalid
  • Issue a notice message about negative values automatically being converted to positive
  • Model the system with the described geometry but with a notice (e.g., model tilt = -10 and azimuth =180 as tilt = 10 and azimuth = 0)

Screenshots

Notice that occurs when assigning a negative tilt (note that tilt angle in the notice is positive):
image

Results with tilt = 10, azimuth = 180:
image

Results with tilt = -10, azimuth = 180 (same as above, not what I expected):
image

Results with tilt = 10, azimuth = 0 (what I expected -10, 180 to look like):
image

Inputs browser for reference:
image

Operating System and Version

  • OS: Windows
  • Version: SAM 2021.12.2 r2 [e.g. SAM 2020.2.29 r3]

Tagging @kanderso-nrel and @kurt-rhee, since they brought up this issue here pvlib/pvlib-python#1471.

@kandersolar
Copy link
Member

Thanks @williamhobbs, I was just looking into this myself. I believe this is the relevant line of code in SSC: https://github.com/NREL/ssc/blob/1ed56222b4f4a5991eaef697dac2af7a929401c3/shared/lib_pv_io_manager.cpp#L339

        if (cm->is_assigned(prefix + "tilt")) tiltDegrees = fabs(cm->as_double(prefix + "tilt"));

As far as "expected behavior", I'd favor the first of @williamhobbs's suggestions (Issue an error message about negative values being invalid). This would also be consistent with the constraint "MIN=0,MAX=90" listed in _cm_vtab_pvsamv1 for subarrayN_tilt.

@williamhobbs
Copy link
Contributor Author

The error message is also my preferred solution. Changing user inputs to give them either result, even with a notice, seems problematic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants