SWH Simulations

  • Julio Perez
  • Topic Author
More
04 Feb 2020 23:07 #7942 by Julio Perez
SWH Simulations was created by Julio Perez
Hello,

I am working on a SDK model on python where I update the weather file with data from 624 locations in the state of California. I am trying to retrieve the hourly T_deliv for each node but I am not exactly sure how. The code simulates the swh model for 624 nodes (624 stations where DNI, Tamb, etc. are obtained from) but I am not able to get the T_del for each node. Can someone suggest any ideas please. Thank you. 

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

  • Paul Gilman
More
05 Feb 2020 22:47 #7951 by Paul Gilman
Replied by Paul Gilman on topic SWH Simulations
Hi Julio,

Are you able to read the value of "t_deliv' for a single simulation? Note that the variable name is all lower case.

That variable should be an array of 8760 values.

Best regards,
Paul.

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

  • Julio Perez
  • Topic Author
More
06 Feb 2020 01:47 #7952 by Julio Perez
Replied by Julio Perez on topic SWH Simulations
Yes, I am only able to get the hourly T_deliv for the last node for some reason. I retrieve the T_deliv via [ T_deliv = ssc.data.get_array(data, 'T_deliv") ] but only for the last node. I need to loop this for each node and retrieve it with would be a matrix of (624 x 8760) but I am not exactly sure how. I hope this is clear enough and thanks in advance. 

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

  • Paul Gilman
More
10 Feb 2020 17:35 #7963 by Paul Gilman
Replied by Paul Gilman on topic SWH Simulations
Hi Julio,

That sounds like it might be caused by your method for building the matrix. It might be an array of nodes, each containing an array of hourly values:

[  [ h0, h2, h3, ..., h8759]  ,  [ h0, h2, h3, ..., h8759] ,  ...  ,  [ h0, h2, h3, ..., h8759]  ]

Thanks,
Paul.

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

  • Julio Perez
  • Topic Author
More
11 Feb 2020 20:35 #7965 by Julio Perez
Replied by Julio Perez on topic SWH Simulations
Hi Paul,

Exactly!! Do you have any suggestions how I can extract the matrix? Every time each node is ran simulation I should be getting T_deliv (array of 9760) but I am not sure how to loop it within the 'swh' execution. Thanks. 

-Julio

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

  • Paul Gilman
More
12 Feb 2020 17:23 - 12 Feb 2020 17:23 #7973 by Paul Gilman
Replied by Paul Gilman on topic SWH Simulations
Hi Julio,

If I understand your question correctly, your algorithm should look something like the following. I've written this in pseudocode so you will need to write your own code based on it.
// run simulations and store results 
// results is an array of size n_nodes x 8760
for i = 0 to n_nodes
{
   set input parameters
   simulate
   results[i] = get(t_deliv)
}

// extract results
for i = 0 to length(results)
{
   // results[i] is an array of length 8760
   print(results[i])
}

Best regards,
Paul.
Last edit: 12 Feb 2020 17:23 by Paul Gilman.

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

Moderators: Paul Gilman
Powered by Kunena Forum