Hi,
I am working on assessing the feasibility of PV in different locations of the world. I am using a simple efficiency PV model for the simulation. To make things easier I decided to use the Python code generated by SAM to loop the outputs for multiple locations. I am not able to understand how to get the annual net DC energy alongside the four generated outputs (annual AC energy, capacity factor, energy yield, and performance ratio.
ssc.module_free(module)
annual_energy = ssc.data_get_number(data, b'annual_energy')
print('Annual energy (year 1) = ', annual_energy)
capacity_factor = ssc.data_get_number(data, b'capacity_factor')
print('Capacity factor (year 1) = ', capacity_factor)
kwh_per_kw = ssc.data_get_number(data, b'kwh_per_kw')
print('Energy yield (year 1) = ', kwh_per_kw)
performance_ratio = ssc.data_get_number(data, b'performance_ratio')
print('Performance ratio (year 1) = ', performance_ratio)
annual_dc_net = ssc.data_get_number(data, b'Annual_DC_energy')
print('Annual DC energy (year 1) = ', annual_dc_net)
ssc.data_free(data)
Whenever I run this in the program, I get the value of DC energy to be zero. Can someone please guide me on this?
Also, the complete code for the program can be found here:
drive.google.com/drive/folders/1vNCFM9-maB0NFok-MM5_3kMM2EGUC03U?usp=sharing
Thank You.
P.S. I am new to programming
File Attachment:
File Name:
SAMcode.py
File Size:30 KB
File Attachment:
File Name:
PySSC.py
File Size:7 KB