Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hercules v1.1 #116

Merged
merged 46 commits into from
Sep 27, 2024
Merged

Hercules v1.1 #116

merged 46 commits into from
Sep 27, 2024

Conversation

misi9170
Copy link
Collaborator

@misi9170 misi9170 commented Sep 27, 2024

Hercules v1.1 adds various new features and improvements, as described below.

New features

Improvements and bug fixes

New Contributors

Full Changelog: v1.0...v1.1

jfrederik-nrel and others added 30 commits December 22, 2023 14:09
* Setting up example to work through.

* bugfix: fix old dummy name.

* Constructs fi object.

* appears to run as expected.

* Various updates for smoother running.

* Ruff.

* Remove gch yaml in favor of a default dictionary defined in floris_standin.py

* Undo ruff format, which fights with ruff.

* Tests for FlorisStandin.

* ruff

* Adding correct floris branch to github workflow for testing.

* try again...

* and again.

* ready to test external data.

* Test for external data built out and passing.

* ruff.

* Remove obselete handling.

* match reconfiguration of turbine package.

* add pip install instructions.

* ruff :(

* Standin power specified in kW; emulator uses correct actuator.

* Update test to reflect kW units.

* remove unused JoukowskyDisk information.

* Adding a comment explaining units in Floris power calculation

* Adjusting to meet Ruff standards

* Line shortened.

---------

Co-authored-by: Genevieve Starke <Genevieve.Starke@nrel.gov>
Co-authored-by: jfrederik-nrel <120053750+jfrederik-nrel@users.noreply.github.com>
* simple battery unit tests

* update WHOC WindBatteryController name

* Add alternative standin for AMR-wind that runs FLORIS (#63)

* Setting up example to work through.

* bugfix: fix old dummy name.

* Constructs fi object.

* appears to run as expected.

* Various updates for smoother running.

* Ruff.

* Remove gch yaml in favor of a default dictionary defined in floris_standin.py

* Undo ruff format, which fights with ruff.

* Tests for FlorisStandin.

* ruff

* Adding correct floris branch to github workflow for testing.

* try again...

* and again.

* ready to test external data.

* Test for external data built out and passing.

* ruff.

* Remove obselete handling.

* match reconfiguration of turbine package.

* add pip install instructions.

* ruff :(

* Standin power specified in kW; emulator uses correct actuator.

* Update test to reflect kW units.

* remove unused JoukowskyDisk information.

* Adding a comment explaining units in Floris power calculation

* Adjusting to meet Ruff standards

* Line shortened.

---------

Co-authored-by: Genevieve Starke <Genevieve.Starke@nrel.gov>

* Update README.md (#65)

Co-authored-by: jfrederik-nrel <120053750+jfrederik-nrel@users.noreply.github.com>

* Bugfix -- track floris v4 change in input file. (#66)

---------

Co-authored-by: Zachary <ztully@nrel.gov>
Co-authored-by: misi9170 <39596329+misi9170@users.noreply.github.com>
Co-authored-by: Genevieve Starke <Genevieve.Starke@nrel.gov>
Co-authored-by: genevievestarke <103534902+genevievestarke@users.noreply.github.com>
Co-authored-by: jfrederik-nrel <120053750+jfrederik-nrel@users.noreply.github.com>
Co-authored-by: misi9170 <michael.sinner@nrel.gov>
* Update README.md

* fix deltat error

* Fixing wind direction setting in amr_wind_standin

---------

Co-authored-by: jfrederik-nrel <120053750+jfrederik-nrel@users.noreply.github.com>
Co-authored-by: Vaidhynathan <deepthi.vaidhynathan@nrel.gov>
* Running with null power setpoints.

* Ruff.

* power_setpoints test.

* tests built out; units consistently kW.

* Note for pwoer_setpoints being sent to AMRWind.

* Enable a no value float for yaw angles.

* Provide external data to Emulator.

* ruff

* test output filename

* Add test data; consistent with csv file appends.

* minor key name change; untested.

* Fixing key error in emulator.py

* Temp demo scripts.

* Minor demo updates.

* merging changes.

* Ensure time for external signals matches absolute_helics_time, even if simulation does not start at expected start_time

* Remove demo code.

* Cleanup.

* cleanup 2.

* remove unneeded print statements.

---------

Co-authored-by: Genevieve Starke <Genevieve.Starke@nrel.gov>
…in FLORIS v4 (#83)

* Update FlorisStandin to use set() run() paradigm

* Improve retained yaw misalignments test.
* Updating installation documentation

* Fixing typo

* Update commands

* Fix typo in Kestrel instructions

* Kestral instructions edit

* Another typo fix
* Handling to allow variable length control signal to *optionally* pass power_setpoints.

* Fix comment.
* created dummy example for amr wind dummy + solar

* final commit before creating feature branch

* standalone solar pysam example

* working standalone example of solar pysam model

* removed time as explicit input in step

* working example of solar pysam and hercules (but pysam has a bug)

* changing hardcoded stoptime of 100 s to 1000 s to demo solar module

* cleaning before pull request review of misha's changes

* working solar pysam example with test amr wind

* adding updated results in jupyter notebook

* trying to run after git pull of develop

* solar model runs successfully, but there is a time issue

* correcting irradiance field and removing unnecessary comments

* removing unnecessary files

* removing test amr wind and solar example, saving for separate PR

* adding environment yaml file needed for pysam

* updating setup and docs to include pysam and restrict python version

* adding missing csv weather file

* Minor changes for running the code

* Minor cleanup in example.

* remove environment.yml

* adding solar module unit tests

* adding relative path for pytest functionality

* correcting ruff formatting and except

* more ruff formatting

* adding skeleton files for solar pv

* adding solar pysam description

* removing documentation changes, saving for a separate PR

* removing documentation changes, saving for a separate PR

* removing documentation changes, saving for a separate PR

* adding comments to the tests

* fix comments for PV

* adding documentation, moving lat long to input file, correcting irradiance output

* doc updates, code clean up

* docs updates

* minor cleanup

* ruff formatting and minor cleanup

---------

Co-authored-by: Genevieve Starke <Genevieve.Starke@nrel.gov>
Co-authored-by: misi9170 <michael.sinner@nrel.gov>
* Add README

* Update batch script

* Update deploy pages

* Update toc

* fixing solar_pysam UnicodeDecodeError bug

* Update README

* Back update example 6 script

---------

Co-authored-by: brookeslawski <brooke.stanislawski@gmail.com>
…response (#90)

* Rough implementation for output filter.

* Port over to v4 FlorisModel changes; tests failing now due to output filter.

* Enable setting smoothing_coefficient on instantiation.

* Specificy smoothing_coefficient as zero to restablish previous operation for testing.

* Tests for smoothing output added.
… file does not exist (#93)

* Create outputs folder on calling amr_wind_standin.py, to avoid bug when outputs folder not already present.

* Missed one
* created file for battery documentation

* Battery doc started

* Separate simple and LI battery

* LIB troubleshooting

* comments and tests

* tests

* tests

* ruff formatting details

* fix emulatore main dict logging bug

* reformatting for ruff

* fixed FlorisStandin testing bug

* relax test requirements slightly

* first pass battery documentation

* minor changes to comments, tests, .gitignore

* Updating example to use 5 MW NREL Reference turbine and adding a jupyter notebook to look at the outputs

---------

Co-authored-by: Zachary <ztully@nrel.gov>
Co-authored-by: Genevieve Starke <Genevieve.Starke@nrel.gov>
* bug fix for operation model name

* Add enable_active_wake_mixing flag to default_floris_dict.

---------

Co-authored-by: misi9170 <michael.sinner@nrel.gov>
* Fix amr input file format

* Updating Ex05 with electrolyzer plant to run with Floris

* Commiting changes for example, example needs deeper Elec debugging

* Updated floris-electrolyzer example

* Taking out print statements

* Adding supporting files for example, example documentation, and renaming folder to represent new example

* Adjusting input files to match

* Updating Ex 05 analysis script
misi9170 and others added 16 commits April 12, 2024 15:59
* Add FLORIS to requirements list; remove special installation instructions."

* require floris > 4/

* Change to compatible release clause.
…andin in example 07 (#104)

* created dummy example for amr wind dummy + solar

* final commit before creating feature branch

* standalone solar pysam example

* working standalone example of solar pysam model

* removed time as explicit input in step

* working example of solar pysam and hercules (but pysam has a bug)

* changing hardcoded stoptime of 100 s to 1000 s to demo solar module

* cleaning before pull request review of misha's changes

* working solar pysam example with test amr wind

* adding updated results in jupyter notebook

* trying to run after git pull of develop

* solar model runs successfully, but there is a time issue

* correcting irradiance field and removing unnecessary comments

* removing unnecessary files

* removing test amr wind and solar example, saving for separate PR

* adding environment yaml file needed for pysam

* updating setup and docs to include pysam and restrict python version

* adding missing csv weather file

* Minor changes for running the code

* Minor cleanup in example.

* remove environment.yml

* adding solar module unit tests

* adding relative path for pytest functionality

* correcting ruff formatting and except

* more ruff formatting

* adding skeleton files for solar pv

* adding solar pysam description

* removing documentation changes, saving for a separate PR

* removing documentation changes, saving for a separate PR

* removing documentation changes, saving for a separate PR

* adding comments to the tests

* fix comments for PV

* adding documentation, moving lat long to input file, correcting irradiance output

* doc updates, code clean up

* docs updates

* minor cleanup

* ruff formatting and minor cleanup

* saving files before switching branches

* adding default inputs - not working yet

* calc max power for controls feedback optimization

* cleaning up code

* more code cleanup

* refactored to remove nested for loop, but no speed up

* fixing github vis

* starting setpoints feature, not working yet

* working initial pv plant controller

* first attempt at feeding in setpoints via external_data_file

* replacing amr wind standin with floris standin due to error in amrwind

* trying to run without external_data_file but getting zeros and floris is hanging

* hercules is hanging

* working version of floris and solar example

* working but messy version of solar controller

* adding the external data file

* cleaning up emulator.py

* cleaning up emulator.py

* working floris stand in and pv plant controller

* cleanup

* Ruff compatibility.

* cleaning up files

* fixing errors in tests

* fixing standalone example

* ruff changes

* removing amr_wind standin run script

* adding external_data_file solar_power_reference.csv

* clarifing controller input in README and fixing dc_power_mw error in test_read_output.ipynb

* Handling for when power_setpoints not available.

* Remove & on second call so that script terminates as expected.

* Updating units for results plots

* Make ruff compliant

* Make ruff compliant 2

---------

Co-authored-by: Genevieve Starke <Genevieve.Starke@nrel.gov>
Co-authored-by: misi9170 <michael.sinner@nrel.gov>
* Added example using AMR-Wind with OpenFAST turbine

* Added batch script and amr input file

* Adding changes for kestrel and diameter definition

* Adding documentation for this example

---------

Co-authored-by: Joeri Frederik <jfrederi@kl2.head.cm.kestrel.hpc.nrel.gov>
Co-authored-by: Genevieve Starke <gstarke@kl1.head.cm.kestrel.hpc.nrel.gov>
Co-authored-by: Genevieve Starke <Genevieve.Starke@nrel.gov>
* Allow external power setpoints to be passed in; move handling of None setpoint to control() method.

* Add handling for possibility that py_sims not on the input dict.

* Add test for control setpoint passed.

* AMR wind speed collected in main_dict.
…tpoints` passed (#109)

* Switch to zero yaw misalignments when valid power setpoints are passed to avoid FLORIS error.

* Raise warning, update test.

* More complex handling to check pairwise combos of power_setpoints and yaw_angles.

* Remove unneeded local floris install.

* Add check to ruff statement

* try forcing matplotlib version

* try 2.0

* set it back

* try 3.7

* Add verbosity to output

* Add alternative os

* take out verbose tests

---------

Co-authored-by: Paul <paul.fleming@nrel.gov>
…ile (#111)

* created dummy example for amr wind dummy + solar

* final commit before creating feature branch

* preparing inputs for running hercules using ARM solar data

* running OK ARM solar data

* running hercules using solar data from ARM in OK

* minor cleanup

* improving how solar pysim grabs data from solar weather file based on simulation time

* removing unnecessary files

* minor cleanup

* more minor cleanup

* cleanup

* ruff fixes

* ruff formatting

* adding input solar data

* adding verbose flag to turn on and off debugging print statements
* Example code.

* Handling for heterogeneous inflows.

* Minor documentation updates.

* Add tests for heterogeneous inflow feature.

* Add exclusion for input data file to gitignore and add file to repo.

* Another needed input excluded in gitignore...
Co-authored-by: Starke <gstarke@gstarke-41230s.nrel.gov>
@misi9170
Copy link
Collaborator Author

Note that tests are failing for unclear reasons (they pass locally), see discussion n #109

@misi9170 misi9170 merged commit 8b57e3d into main Sep 27, 2024
12 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants