Skip to content

Conversation

@cpaulgilman
Copy link
Collaborator

@cpaulgilman cpaulgilman commented Nov 23, 2025

Description

This PR reorganizes inputs for the Detailed PV (Flat Plate PV) model to improve usability.

Note Help will be updated in a separate pull request: Help pages for new UI forms do not work in this PR.

  • Fix Enable row spacing (pitch) as an input #2074 by adding an option to specify row spacing using either the GCR input or distance between rows as input.

  • Fix Loading Inverter Page resets custom inverter voltage ratings on System Design page #2082 by moving the "number of MPPTs" input from the inverter input page to the System Size page so that all of the MPPT inputs are in one place.

  • Add a new Set row dimensions when modules per string check box to the System Size page as an option to automatically set number of modules along bottom to the number of modules per string, and number of modules along side to 1. This avoids confusion about non-integer number of rows.

Variables

This PR includes new export_config files to account for variable changes that affect PySAM.

New Variables

These are for the new option to specify row spacing or GCR.

gcr_option
subarray2_ui_row_spacing
subarray2_ui_row_spacing
subarray3_ui_row_spacing
subarray4_ui_row_spacing

New option to automatically set modules along bottom of row to modules per string

ui_chkbox_nmodx_eq_mod_per_string

Changed Variable Names

Move position of "ui" in variable names consistency in subarray variable names to facilitate UI callback FOR loops:

Old New
ui_subarray1_row_spacing subarray1_ui_row_spacing
ui_subarray2_row_spacing subarray2_ui_row_spacing
ui_subarray3_row_spacing subarray3_ui_row_spacing
ui_subarray4_row_spacing subarray4_ui_row_spacing
ui_subarray1_length_side subarray1_ui_length_side
ui_subarray2_length_side subarray2_ui_length_side
ui_subarray3_length_side subarray3_ui_length_side
ui_subarray4_length_side subarray4_ui_length_side
ui_subarray1_nrows subarray1_ui_nrows
ui_subarray2_nrows subarray2_ui_nrows
ui_subarray3_nrows subarray3_ui_nrows
ui_subarray4_nrows subarray4_ui_nrows
ui_subarray4_nrows subarray4_ui_nrows

Replace "ref" with "ui" for consistency to indicate variables that are not used in SSC:

Old New
subarray1_ref_nmodules subarray1_ui_nmodules
subarray2_ref_nmodules subarray2_ui_nmodules
subarray3_ref_nmodules subarray3_ui_nmodules
subarray4_ref_nmodules subarray4_ui_nmodules

Rename GCR input (remove ref because this is an SSC variable). The ref variables were UI only, _gcr defaults do not change:

Old New
subarray1_gcr_ref subarray1_gcr
subarray2_gcr_ref subarray2_gcr
subarray3_gcr_ref subarray3_gcr
subarray4_gcr_ref subarray4_gcr

Changed Default Values

For multiple MPPTs, set the initial state of each MPPT input to one when user changes number of MPPTs to a number greater than one. New UI messages help user assign correct value to each MPPT.

Variable Old New
subarray2_mppt_input 2 1
subarray3_mppt_input 3 1
subarray4_mppt_input 4 1

Deleted Variables

Variable Description
total_dc_inverter_capacity UI for comparison with array DC capacity on old System Design page. Removed to reduce clutter.
num_strings_total UI for sizing summary on old System Design page. Removed to reduce clutter.
num_enabled Was needed for MPPT UI message boxes. Improved UI design eliminates these messages. Not used for simulation.
offset Was on old PV System Design form with Default UIObject and no widget and "row offset" label. Does not appear to be used.
transformer_rating Was on old PV Losses form with Numeric UIObject but no widget. Does not appear to be used
pv_land_area_is_shown Remove collapsible pane for land area inputs. Now on Tracking Layout Land page
mismatch_shown For subarray mismatch old collapsible pane, now part of Electrical Losses page.

Delete individual "number of MPPT" input on inverter UI forms and use single inv_num_mppt input on System Sizing Page. This eliminates the need for UI callback to assign value and puts input:

inv_snl_num_mppt
inv_cec_cg_num_mppt
inv_ds_num_mppt
inv_pd_num_mppt

Cross axis slope appears to be calculated in lib_irradproc.cpp from terrain slope and terrain azimuth, so not needed in UI.

subarray1_cross_axis_slope
subarray2_cross_axis_slope
subarray3_cross_axis_slope
subarray4_cross_axis_slope

Defaults

All defaults should be updated, and "calculated value" inputs should have default values that correspond to default values of editable variables.

Variable Default Value
gcr_option 1
subarray1_gcr 0.3
subarray1_mppt_input 1
subarray1_rack_shading 4
subarray1_nmodx 1
subarray1_nmody subarray1_modules_per_string
subarray1_ui_nrows UI calculated
subarray1_ui_length_side UI calculated
subarray1_ui_nmodules UI calculated
subarray1_ui_row_spacing UI calculated
subarray2_gcr 0.3
subarray2_mppt_input 1
subarray2_rack_shading 4
subarray2_nmodx 1
subarray2_nmody 1
subarray2_ui_nrows UI calculated
subarray2_ui_length_side UI calculated
subarray2_ui_nmodules UI calculated
subarray2_ui_row_spacing UI calculated
subarray3_gcr 0.3
subarray3_mppt_input 1
subarray3_rack_shading 4
subarray3_nmodx 1
subarray3_nmody 1
subarray3_ui_nrows UI calculated
subarray3_ui_length_side UI calculated
subarray3_ui_nmodules UI calculated
subarray3_ui_row_spacing UI calculated
subarray4_gcr 0.3
subarray4_mppt_input 1
subarray4_rack_shading 4
subarray4_nmodx 1
subarray4_nmody 1
subarray4_ui_nrows UI calculated
subarray4_ui_length_side UI calculated
subarray4_ui_nmodules UI calculated
subarray4_ui_row_spacing UI calculated
ui_chkbox_nmodx_eq_mod_per_string 1

Remove High X Concentrating PV inv_snl_num_mppt

Corresponding branches and PRs:

The SAM/pv-ui-design branch goes with Develop branches of SAM-private, SSC, LK and WEX.

Unit Test Impact:

For configurations that have one-axis tracking as default, e.g., Detailed PV / Single Owner, the change in default number of modules along bottom and side changes the total annual energy, so this includes an updated test results file.

Checklist

  • requires help revision and I added that label
  • adds, removes, modifies, or deletes variables in existing compute modules
  • adds a new compute module
  • changes defaults
  • I've tagged this PR to a milestone

Includes copies of UI forms to be deleted before final merge
Add new row spacing variables:

```
gcr_option
subarray2_ui_row_spacing
subarray2_ui_row_spacing
subarray3_ui_row_spacing
subarray4_ui_row_spacing
```

Change variable names that start with `ui` so that `ui` follow subarray number for consistency (helps with UI callback FOR loops).

Use `ui` instead of `ref` for variables that are not in SSC for consistency.

Change MPPT input default value to one for all subarrays because of improved UI text.

Delete unused variables:

| Variable | Description |
| --- | --- |
| total_dc_inverter_capacity | UI for comparison with array DC capacity on old System Design page. Removed to reduce clutter. |
| num_strings_total | UI for sizing summary on old System Design page. Removed to reduce clutter. |
| num_enabled | Was needed for MPPT UI message boxes. Improved UI design eliminates these messages. Not used for simulation. |
| offset | Was on old PV System Design form with Default UIObject and no widget and "row offset" label. Does not appear to be used. |
| transformer_rating | Was on old PV Losses form with Numeric UIObject but no widget. Does not appear to be used |
| pv_land_area_is_shown | Remove collapsible pane for land area inputs. Now on Tracking Layout Land page |
| mismatch_shown | For subarray mismatch old collapsible pane, now part of Electrical Losses page. |

Delete individual "number of MPPT" input on inverter UI forms and use single `inv_num_mppt` input on System Sizing Page. This eliminates the need for UI callback to assign value and puts inputj.

```
inv_snl_num_mppt
inv_cec_cg_num_mppt
inv_ds_num_mppt
```

Remove cross axis slope variables that are calculated in lib_irradproc.cpp.
… for migration to new PV UI design

Move `setup_grid_limits_page()` out of `setup_flat_plate_pv pages()` function
Fix bifacial mismatch check box
For navigation menu, put PV pages in collapsible bin for PV battery configs
@cpaulgilman cpaulgilman added pv pvsam1, pvwatts, hcpv requires help revision Requires a Help revision before releasing public version UI User interface issue that applies across performance and financial models labels Nov 23, 2025
@brtietz
Copy link
Collaborator

brtietz commented Nov 25, 2025

Thanks! This is much more streamlined and intuitive!

Some notes on versions.lk:

  • Variables on the system size screen seem to work
  • Row dimensions are being overwritten on upgrade - should "set row dimensions when module per string changes" be turned off by the upgrade script (even if it's on by default in the UI)?
  • The version upgrade script doesn't notify the user about the changes.

I'll post more as I have a chance to run through some more tests.

@cpaulgilman
Copy link
Collaborator Author

  • Row dimensions are being overwritten on upgrade - should "set row dimensions when module per string changes" be turned off by the upgrade script (even if it's on by default in the UI)?

  • The version upgrade script doesn't notify the user about the changes.

Fixed in latest commit. Thanks!

@brtietz
Copy link
Collaborator

brtietz commented Dec 2, 2025

Thanks for fixing the version upgrades script! I found an unrelated small bug this morning. With multiple subarrays, the "tilt = latitude" box always greys out the subarray 1 box, instead of the one directly below it:

image

Expected behavior is that each checkbox should apply to it's own subarray.

Edit: the behavior gets stranger if I go to another page and come back:

image

This suggests the correct behavior is in an "on start" call back, but "on change" has a bug.

@cpaulgilman
Copy link
Collaborator Author

With multiple subarrays, the "tilt = latitude" box always greys out the subarray 1 box, instead of the one directly below it.

Thanks for finding. Should be fixed now.

Copy link
Collaborator

@brtietz brtietz left a comment

Choose a reason for hiding this comment

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

Awesome! You've fixed everything I could find: I tried a lot of weird electrical and subarray combinations and everything worked.

Probably best to wait for ~2 more people to test prior to merging in case they think of other test setups I missed.

@brtietz
Copy link
Collaborator

brtietz commented Dec 4, 2025

@cpaulgilman I stumbled across another bug today: it looks like the new UI is incompatible with the simple efficiency module model. If you open detailed PV and change to that model, there's a callback error:

image

A similar error occurs for CEC performance model with user entered specifications.

@cpaulgilman
Copy link
Collaborator Author

@brtietz Looks like I missed a couple of underscores there. Latest commit should fix those.

@mjprilliman
Copy link
Collaborator

I will make time for detailed review tomorrow. Sorry for the delay!

Copy link
Collaborator

@mjprilliman mjprilliman left a comment

Choose a reason for hiding this comment

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

I think the PV Battery default Row Dimensions should match Detailed PV (1 x 28) for consistency. Same for the Detailed PV hybrid configs.

Other than that this seems very well stress-tested as I can't find any issues. The information flow all feels intuitive to me.

I may get a chance to review more next week, but I'm also open to merging and making a revisions PR at a later point if that seems like a better plan. Not sure if we want to leave this open until Janine and others get to review.

@cpaulgilman
Copy link
Collaborator Author

I think the PV Battery default Row Dimensions should match Detailed PV (1 x 28) for consistency. Same for the Detailed PV hybrid configs.

@mjprilliman Good catch. Do you think the default modules along side of row should be set to 1 for all configurations, including the smaller Residential and Third Party Ownership systems? I'm leaning toward yes.

@mjprilliman
Copy link
Collaborator

I think the PV Battery default Row Dimensions should match Detailed PV (1 x 28) for consistency. Same for the Detailed PV hybrid configs.

@mjprilliman Good catch. Do you think the default modules along side of row should be set to 1 for all configurations, including the smaller Residential and Third Party Ownership systems? I'm leaning toward yes.

@cpaulgilman I also lean towards yes, just for consistency. Self-Shading and land area are much less of a concern for those sets of defaults.

@cpaulgilman cpaulgilman merged commit 6493441 into develop Dec 8, 2025
8 checks passed
@cpaulgilman cpaulgilman deleted the pv-ui-design branch December 8, 2025 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pv pvsam1, pvwatts, hcpv requires help revision Requires a Help revision before releasing public version UI User interface issue that applies across performance and financial models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Loading Inverter Page resets custom inverter voltage ratings on System Design page Enable row spacing (pitch) as an input

5 participants