Creating a function to monitor PV module output as a function of cell efficiency

  • Michael Caballero
  • Topic Author
More
14 Jan 2025 11:46 #13808 by Michael Caballero
Hello,

I'm trying to create a model in python for microgrid capacity based on load requirements. Basically I'm trying to get to a point where the model i create says 'based on this electric load, solar resource at this location, and costs, the optimal PV module efficiency is X%" Within the pvsamv1 model and the PVBatteryThirdParty configuration how can I call up and modify specific variables? Also has anyone done any work with changing these parameters from values to continuous variables?

Thanks,
Michael 

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

  • Paul Gilman
More
14 Jan 2025 12:49 #13809 by Paul Gilman
Hi Michael,

For information about working with variables, see:

nrel-pysam.readthedocs.io/en/main/variables-pysam.html

nrel-pysam.readthedocs.io/en/main/variables-sam.html

One approach might be to design your approach using the SAM desktop application: Use it to identify the input variables you want to change and the output variables you want to evaluate, and then set up the model in Python to work with those variables.

Best regards,
Paul.

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

  • Michael Caballero
  • Topic Author
More
14 Jan 2025 14:25 #13810 by Michael Caballero
Hi Paul,

Thanks for this. I think using the simple efficiency model makes the most sense for my model. The inputs I want to modify are PV STC and nominal efficiency and the output I'm looking for is hourly generation. Look at the SAM GUI the value is 'Electricity from System to load' from the data tables after simulation is complete. I want to see how the hourly PV power out changes based on STC and efficiency given solar resource data.

In a semi-related question: How do I make sure when a model executes its using the desired module model. For example if I have a model called newmodel set to PV-Battery Third Party newmodel=pv.default("PVBatteryThirdParty")How do I code it so it executes using the simple efficiency model as opposed to the CEC model since they're both set up with with pvsamv1.

Thanks,
Michael

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

  • Paul Gilman
More
14 Jan 2025 16:47 #13811 by Paul Gilman
Hi Michael,

The variable that sets the module model is 'module_model' where:

0 = Simple efficiency model
1 = CEC performance model with module database
2 = CEC performance model with user entered specifications
3 = Sandia array performance model with module database
4 = IEC61853 single diode model

Its PySAM documentation is here: nrel-pysam.readthedocs.io/en/main/modules/Pvsamv1.html#PySAM.Pvsamv1.Pvsamv1.Module.module_model

The "Electricity from System to load" variable name is 'year1_hourly_system_to_load', which is an output of the Utilityrate5 module:  nrel-pysam.readthedocs.io/en/main/modules/Utilityrate5.html#PySAM.Utilityrate5.Utilityrate5.Outputs.year1_hourly_system_to_load

Best regards,
Paul.
 

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

Moderators: Paul Gilman
Powered by Kunena Forum