Heliostat Field Looks Incorrect in PySAM (SolarPILOT Optimization)

  • Ricardo
  • Topic Author
More
24 Jan 2025 14:19 #13834 by Ricardo
Hello,
I am trying to create a scenario slightly different from the default configuration of SAM for CSP Tower Molten Salt without a financial model (a.k.a. "No financial" in PySAM). For this, I used the attached Python script.The problem arises when I simulate the scenario and plot the heliostat field. The results do not look correct; in fact, they look very bad. I am unsure if I assigned an incorrect value to a variable.I have also attached the weather data, which is one of the official SAM datasets.I have identified the optimization setting in the Python script with a comment. The variable responsible is called
Code:
field_model_type
.

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
28 Jan 2025 13:40 - 28 Jan 2025 13:46 #13840 by Paul Gilman
Hi Luis,

First, please update your PySAM to Version 6.0.0. I could not get your script to work in PySAM 5.1.0.

If you run your script, you will get a field with the maximum allowable number of heliostats given the default boundaries for the SolarPILOT optimization algorithm, which results in the receiver under-performing:



Because these default boundaries scale with tower height, you could solve this problem by increasing the tower height. Or, you could use the field optimization method (field_model_type = 0), which will optimize the tower height, receiver height, and receiver diameter using a cost and performance objective:

 

Best regards,
Paul.
 
Last edit: 28 Jan 2025 13:46 by Paul Gilman.

Please Log in or Create an account to join the conversation.

  • John Anderson
More
29 Jan 2025 01:04 - 30 Jan 2025 17:41 #13841 by John Anderson
Hi Ricardo,It looks like the issue might be related to the default boundary constraints set for the SolarPILOT optimization algorithm in PySAM. Since these boundaries scale with tower height, the field model may be generating a suboptimal heliostat arrangement, causing the receiver to underperform.Suggested Fixes:
  1. Increase Tower Height – Adjusting this parameter should help improve the field layout and receiver performance.
  2. Use Field Optimization Method – Set 'field_model_type = 0', which allows the system to optimize tower height, receiver height, and receiver diameter based on cost and performance objectives.
Additionally, I recommend updating to PySAM Version 6.0.0 if you haven’t already, as earlier versions may have compatibility issues with your script.Let me know if you need further assistance!
Last edit: 30 Jan 2025 17:41 by Paul Gilman.

Please Log in or Create an account to join the conversation.

  • Ricardo
  • Topic Author
More
29 Jan 2025 09:03 - 30 Jan 2025 17:43 #13842 by Ricardo
Hi Paul,

Thanks for your response. Are you sure that version 6.0.0 of PySAM exists?

In the documentation, I only see 5.1.0 as the latest version: [url] nrel-pysam.readthedocs.io/en/main/versions.html [/url]

The same appears on GitHub:[url] github.com/NREL/pysam/releases [/url]

I have attached the 'requirements.txt' file from my Conda environment to ensure that I'm using the correct version and to avoid any issues when running the script.

I increased the tower height but still encountered the same problem. I changed the height to 300 to confirm that the issue is not related to the height. I also tried using the method with 'field_model_type = 0', but that didn’t seem to work well either.

Could the issue be related to the "No financial" model and the default case 'TcsmoltenSalt.default("MSPTNone")'? Could it be that SolarPILOT requires a variable that is not being assigned?Could you provide me with a 'requirements.txt' file so I can try running my script with your environment? Maybe I’m facing a library compatibility issue.
Last edit: 30 Jan 2025 17:43 by Paul Gilman.

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
30 Jan 2025 17:50 #13846 by Paul Gilman
Hi Ricardo,

PySAM 6.0.0 is available on PyPi at pypi.org/project/NREL-PySAM/

We've been having issues with Conda, so I don't think it is posted there yet.

And, as you note, the documentation still refers to the older Version 5.1.0.

We'll try to get this sorted -- thanks for your patience during this transition to the new version.

The 'requirements.txt' file that I used for this test has the following line for PySAM:

NREL-PySAM==6.0.0

Best regards,
Paul.

Please Log in or Create an account to join the conversation.

  • Ricardo
  • Topic Author
More
31 Jan 2025 08:23 #13847 by Ricardo
Hi Paul and John,Thanks for everything. My issue was the version, everything looks good with PySAM 6.0.0. Thanks again!

Please Log in or Create an account to join the conversation.

Moderators: Paul Gilman
Powered by Kunena Forum