NREL / SAM

System Advisor Model (SAM)
BSD 3-Clause "New" or "Revised" License
340 stars 142 forks source link

Physical Trough model "hangs" during a parametric with dispatch enabled #1077

Open qualand opened 2 years ago

qualand commented 2 years ago

Describe the bug

The physical trough model will not progress in a reasonable time when conducting a parametric study on hours of storage and solar multiple with dispatch optimization enabled.

To Reproduce

Steps to reproduce the behavior:

  1. Open the Parabolic Trough - Physical Single Owner Model
  2. Click on System Control and "Enable dispatch optimization"
  3. Click on Parametrics and Quick setup...
  4. Add Hours of storage at design point {'tshours'} and Solar multiple {'specified_solar_multiple'}
  5. Edit there values as follows: Hours of storage 4-18 using a 2 hour interval and solar multiple 1-4 using a 0.5 interval
  6. Click Run simulations

Expected behavior

The model should solve for all combinations. However, some simulations do not solve (see screen) where simulation 19 failed (8 tshours and 2 solar multiple) and two cores are "hanging" making no progress after an extended period of time (about an hour). I will try to narrow down which simulations are causing the issue. This csp solver hanging occurs with the following configurations about 33% through the simulation:

These are obviously "bad" designs but maybe it might be worth understanding why this causes the solver to hang and if the reason leads to a more stable solver.

Screenshots

image

Operating System and Version

Additional context

This is problematic for some analysis completed within HOPP using the physical trough model.

qualand commented 2 weeks ago

Current version on develop handles this parametric much better. It does not "hang" anymore; however simulations with Solar multiple of 1 do fail because solver results in MAX_ITER_SLOPE_POS_NO_NEG_ERR condition (line 2631 in csp_solver_trough_collector_receiver.cpp). This failed simulation in the parametric results in SAM crashing.

If you use relative mass flowrates rather than absolute, this is not a problem.

@tyneises how would you like to proceed?