Detailed PV + Singleowner Project using PySAM

  • Ajinkya Pradip Mahale
  • Topic Author
More
04 Nov 2021 16:57 #10232 by Ajinkya Pradip Mahale
Detailed PV + Singleowner Project using PySAM was created by Ajinkya Pradip Mahale
Hi, 

Let me start by saying thanks for creating this amazing PySAM interface. 

Currently I am working on a project where I need to run a Detailed PV + Singleowner Project using PySAM. 

According to the SAM Simulation Configurations I have read in - nrel-pysam.readthedocs.io/en/master/Configs.html , I believe in order to run the desired project, I need to import the Pvsamv1 and the Singleowner model on PySAM. 

I have already tried working with a Detailed PV + No financial Model Project on PySAM and have cross-checked the Outputs with SAM Desktop results. I have used a YAML file to give the input parameters and used the assign method to give those inputs to the model. And so far it has worked fantastically. 

However, I do not understand how does it work when I want to use both the models (ie Pvsamv1 as well as Singleowner). That is how do I link this two models in PySAM. 

Do I create 2 Yaml Files and assign them to the different models? 

Has anybody tried something like this? 

If yes, please let me know your thoughts. 

Thanks,
Ajinkya

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

  • Paul Gilman
More
04 Nov 2021 23:10 #10235 by Paul Gilman
Replied by Paul Gilman on topic Detailed PV + Singleowner Project using PySAM
Hi Ajinkya,

The Detailed PV / Single Owner configuration requires three modules: Pvsamv1, Grid, and Singleowner, as you can see in the PySAM documentation:



The modules need to be called in the correct order as shown in the documentation.

I'm not exactly sure how you are using the YAML files, but if you are using them to store inputs for the modules, you could store the inputs for each module in a separate file.

Best regards,
Paul.

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

  • Ajinkya Pradip Mahale
  • Topic Author
More
07 Nov 2021 10:10 - 09 Nov 2021 00:58 #10246 by Ajinkya Pradip Mahale
Replied by Ajinkya Pradip Mahale on topic Detailed PV + Singleowner Project using PySAM
HI Paul,

Thanks a lot for your response. 

Yes, I am using the YAML files to store the input parameters. 
 
I tried to execute the models (Grid and Singleowner) with its default inputs. 

However I have got the following errors. 

This is for the Grid Module - 


For the Single Owner Module -


So how do I proceed? 

From what I have understood my next step should be to -

1. Set the 'gen' (System Power Generated) from the Pvsamv1 Outputs equal to the input (System Power Generated) in the Grid SystemOutputs group. 
2. Set the 'annual_energy' from the Pvsamv1 Outputs equal to the input in the Grid SystemOutputs group. 

Is this correct? 

However, this does not solve the error for the Singleowner module. As in the documentation for this module, 'gen' is specified as 'Net power to or from grid' and thus I can't set it equal to 'gen' from Pvsamv1 outputs. Is this correct??

[img]
Last edit: 09 Nov 2021 00:58 by Paul Gilman.

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

  • Paul Gilman
More
09 Nov 2021 01:02 #10251 by Paul Gilman
Replied by Paul Gilman on topic Detailed PV + Singleowner Project using PySAM
Hi Ajinkya,

The Pvsamv1 module will calculate the value of gen,so you should run Pvsamv1, then Grid, then Singleowner.

Best regards.
Paul.

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

  • Ajinkya Pradip Mahale
  • Topic Author
More
09 Nov 2021 18:54 - 10 Nov 2021 23:55 #10257 by Ajinkya Pradip Mahale
Replied by Ajinkya Pradip Mahale on topic Detailed PV + Singleowner Project using PySAM
Hi Paul, 

I have now followed the procedure given on the PySAM documentation regarding 'Creating a Simulation from Multiple Modules'. It is my mistake that I did not follow it earlier. 

So, I have done exactly what has been prescribed there. 

Here is the code that I have written in order to run the simulation -

Importing all the modules - 


Creating a function for running the simulation and getting the desired outputs - 


I will assign the YAML file to the run_1 function in order to run and execute the modules. 
Just to confirm, is this the correct way to run the simulation??
I am getting results at the moment. However, the outputs do not match with the SAM Desktop results. Thus, if my procedure is correct, I will work on checking the input parameters. 

Looking forward to your reply. 

Thanks a lot, 
Ajinkya
Last edit: 10 Nov 2021 23:55 by Paul Gilman.

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

  • Paul Gilman
More
11 Nov 2021 00:01 #10264 by Paul Gilman
Replied by Paul Gilman on topic Detailed PV + Singleowner Project using PySAM
Hi Ajinkya,

This looks like a good approach to me.

I notice that you use default() for the pv1 module and from_existing() for the other two modules. I don't know if that is what is causing the difference between your results and those in SAM.

Best regards,
Paul.

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

Moderators: Paul Gilman
Powered by Kunena Forum