JSON file export for multi iteration

  • Mahdi Alsaffar
  • Topic Author
More
24 Dec 2025 03:19 - 05 Jan 2026 10:51 #14428 by Mahdi Alsaffar
JSON file export for multi iteration was created by Mahdi Alsaffar
Dear SAM team 
I am currently using PySAM to perform parametric analyses, mainly because it provides a much more convenient way to export both hourly (8760) outputs and scalar results to Excel compared to the SAM GUI.However, I am encountering an issue related to design-point consistency during multi-iteration runs.My current workflow is:
  • Start from a single SAM-exported JSON file.
  • Perform multiple runs by iteratively modifying solar multiple and thermal energy storage hours.
  • Each iteration represents a separate case (e.g., a 10-case sweep results in 10 runs).
The modified input values (solar multiple and TES hours) update correctly in each run. However, the design-dependent parameters—such as:
  • thermal storage volume / thermal capacity,
  • total aperture reflective area,
  • number of loops ('nloops'),
    do not appear to be recalculated and instead remain fixed at the base-case design.
I want to clarify that I am aware of the need to allow for automatic design re-sizing. The relevant auto-design / design-sizing flags are enabled (set to 1) in the JSON, and the model is executed accordingly. Despite this, the dependent design-point variables are not updating in the way they typically do when the same parameters are modified directly in the SAM GUI.Given this, I would appreciate guidance on the following:
  1. What is the recommended best practice in PySAM to ensure that all design-point and sizing parameters are fully recalculated when performing parametric sweeps of solar multiple and thermal storage?
  2. Is there a robust workflow to generate and save a full set of case-specific JSON files (similar to SAM GUI case exports), and then run all cases through PySAM while preserving SAM-consistent design behavior?
Any insights into required execution order, module sequencing, or additional design-related settings that must be refreshed or re-initialized for each run would be greatly appreciated.Thank you very much for your time and support.
Last edit: 05 Jan 2026 10:51 by Paul Gilman.

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

  • Taylor Brown
More
06 Jan 2026 13:35 #14444 by Taylor Brown
Replied by Taylor Brown on topic JSON file export for multi iteration
Hi, I'm on the SAM team and am happy to help with this issue.

Can you attach your python script, SAM json file, and which version of SAM you are using?

Thank you!

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

Moderators: Paul Gilman
Powered by Kunena Forum