watertap-org / watertap-reflo

WaterTAP-REFLO repository for development of renewable energy-driven desalination models.
Other
4 stars 11 forks source link

replace PySSC with PySAM for Flat Plate PV data #105

Closed dguittet closed 9 months ago

dguittet commented 10 months ago

For pysam_run_flat_plate.py, the current data generation uses a custom SSC dynamic library saved in the data folder due to new features that had not yet been released in PySAM.

This PR updates the data generation to use the newest PySAM version, and adds a test of running the flat plate PV model ("Solar Water Heating" in SAM) to use as a regression test to make sure the heat_annual and electricity_annual are the same. This is currently a new test file, but I could see this test being merged into test_flat_plate_surrogate.py instead of being a whole new file.

Fixes #99

kurbansitterley commented 10 months ago

For pysam_run_flat_plate.py, the current data generation uses a custom SSC dynamic library saved in the data folder due to new features that had not yet been released in PySAM.

This PR updates the data generation to use the newest PySAM version, and adds a test of running the flat plate PV model ("Solar Water Heating" in SAM) to use as a regression test to make sure the heat_annual and electricity_annual are the same. This is currently a new test file, but I could see this test being merged into test_flat_plate_surrogate.py instead of being a whole new file.

Fixes #99

So this implements a way to generate data for the flat plate surrogate? Could it be generalized to generate data for any input range and location?

dguittet commented 10 months ago

For pysam_run_flat_plate.py, the current data generation uses a custom SSC dynamic library saved in the data folder due to new features that had not yet been released in PySAM. This PR updates the data generation to use the newest PySAM version, and adds a test of running the flat plate PV model ("Solar Water Heating" in SAM) to use as a regression test to make sure the heat_annual and electricity_annual are the same. This is currently a new test file, but I could see this test being merged into test_flat_plate_surrogate.py instead of being a whole new file. Fixes #99

So this implements a way to generate data for the flat plate surrogate? Could it be generalized to generate data for any input range and location?

The original method was using a custom SSC binary stored in data. This modification now uses that SSC binary that comes with the PySAM downloaded as part of the requirements. The file can definitely be modified to change the input range and location.