LK and SAM automation

  • Mohammed Alfailakawi
  • Topic Author
More
22 Jan 2021 13:15 #9212 by Mohammed Alfailakawi
LK and SAM automation was created by Mohammed Alfailakawi
Hello
I am using the LK to simulate a SPT with different attenuation levels. I succeeded to get The Field Optical Efficiency [eta_field] as an hourly output after calling 365 attenuation values for each one of the 4 polynomial coefficients in the atmospheric attenuation section.

The problem is when I try the same for other outputs such as (The Receiver Incident Thermal Power [q_dot_rec_inc], The Field Incident Thermal Power [q_sf_inc] or The PC electrical power output, gross [P_cycle]) I have nothing. Simulations keep giving ''Null'' ..

I attached the LK script in a notepad file, as well as 4 CSV files that the script reads. The SAM file containing the SPT configuration and the weather file. 

I really appreciate your help.

Thanks in adavnce.

Regards,
Mohammed

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

  • Paul Gilman
More
11 Feb 2021 18:59 #9278 by Paul Gilman
Replied by Paul Gilman on topic LK and SAM automation
Hi Mohammed,

This seems to work in SAM 2020.11.29. I tested with the attached modified version of your script.

Best regards,
Paul.

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

  • Mohammed Alfailakawi
  • Topic Author
More
14 Feb 2021 15:59 #9288 by Mohammed Alfailakawi
Replied by Mohammed Alfailakawi on topic LK and SAM automation
Dear Mr. Gilman,

I cannot thank you enough for your unlimited support!

It indeed worked and I got the results I need. However I am going to ask for a last favor. The results are written in the CSV file in rows, each 8760 output is split into two rows. Do you propose any possible method in order to output the latter in single columns? 

I am simulating 365 times (that's 365 x 8760 for the outputs). It would be way much easier for me to manage the CSV file if each 8760 outputs were written in a single column. 

Thanks a lot.

Regards,
Mohammed 

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

  • Paul Gilman
More
19 Feb 2021 01:11 #9305 by Paul Gilman
Replied by Paul Gilman on topic LK and SAM automation
Hi Mohammed,

My modified script writes a table to CSV using the csvwrite() function. You can have more control over how the data is written to the file by using a different approach. Please see Section 9 of the LK Scripting Reference, which you can find by going to SAM's Help system and clicking "Scripting Reference" at the top of the Help window.

Best regards,
Paul.

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

Moderators: Paul Gilman
Powered by Kunena Forum