Skip to content

MSPT design point w/ field layout design selected#976

Merged
tyneises merged 1 commit into
patchfrom
design_pt_generate_layout
Jan 26, 2023
Merged

MSPT design point w/ field layout design selected#976
tyneises merged 1 commit into
patchfrom
design_pt_generate_layout

Conversation

@tyneises

Copy link
Copy Markdown
Collaborator

Problem: When one of the "optimize field" boxes is checked on the MSPT Solar Field page, design point calculations fail and the blue boxes display -789

Background: The MSPT model defines all calculated values by calling the cmod in “design point mode”, designated by cmod input sim_type = 2. The point of the checkboxes is to run the layout routines during the annual simulation, not before (otherwise, the user would just click the macro options). However, that means that the design point that the model will calculate at the beginning of the annual simulation doesn’t exist yet. In the current code, the cmod design-point routine will skip the heliostat field layout, which results in a crash downstream because subsequent design point calculations want these values defined.

Solution:
I think it’s clear we don’t want to call the layout model in these scenarios. This pull request checks if 1) the cmod is being called in design point mode and 2) one of the layout options is selected. If both are true, then the design-point code acts as if the layout boxes are not selected, and it uses the field layout (and possible tower/receiver dimensions) from the UI. This resolves the issue below, albeit with a “fake” design point. This solution adds logic to the cmod that we can’t capture through the “required_if” restrictions on the field layout and tower dimensions inputs in the cmod, but that downside is probably worth it to fix the design point crash.

@tyneises tyneises merged commit abd6cc4 into patch Jan 26, 2023
@tyneises tyneises deleted the design_pt_generate_layout branch January 26, 2023 17:17
@cpaulgilman cpaulgilman added this to the 2022.11.21 Patch 1 milestone Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants