Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
@johnjasa can you remind me, did you say something about not pushing results in Jupyters?
There was a problem hiding this comment.
I believe you are right @kbrunik. @RHammond2 I pushed these results since there were new figures in the example. What is the correct/accepted approach on this?
| onshorey = 50 | ||
|
|
||
| wind_buffer = np.min(turbine_x) - (onshorey + 2 * rotor_diameter + electrolyzer_side) | ||
| wind_buffer = np.min(turbine_x) - (onshorey + 3 * rotor_diameter + electrolyzer_side) |
There was a problem hiding this comment.
We needed a larger buffer so I called the buffer by an extra rotor diameter to avoid overlap in the wind/solar farms
greenheart/tools/eco/utilities.py
Outdated
| for x, y in zip(turbine_x, turbine_y): | ||
| if i == 0: | ||
| elable = "Electrolyzer" | ||
| elabel = "Electrolyzer" |
There was a problem hiding this comment.
I'm wondering if we want to change this to "H$_2$ Electrolyzer" or "PEM Electrolyzer" since we are working on additional types of electrolysis (iron, alkaline, etc)
There was a problem hiding this comment.
Good point. I've changed it to "H$_2$ Electrolyzer" in all instances for now but am open to further changes.
| label="Solar Array", | ||
| hatch=solar_hatch, | ||
| ) | ||
| if design_scenario["wind_location"] != "offshore": |
There was a problem hiding this comment.
Should this be an if statement for "pv_location"?
There was a problem hiding this comment.
No, there are different plots to add solar to depending on if wind is onshore or offshore. Convoluted and should be fixed, but I think that making this plot more clear/robust should wait for another PR.
| # ax[ax_index_wind_plant].autoscale() | ||
| ax[ax_index_wind_plant].set(aspect="equal") | ||
| # ax[ax_index_wind_plant].xaxis.set_major_locator(ticker.\ | ||
| # MultipleLocator(np.round(point_range_x*0.5, decimals=-3))) | ||
| # ax[ax_index_wind_plant].yaxis.set_major_locator(ticker.\ | ||
| # MultipleLocator(np.round(point_range_y*0.5, device_spacing=-3))) |
There was a problem hiding this comment.
Here and in a few spots below here, do you intend to keep these commented lines on purpose?
* Delete .github/workflows/conda_build.yml Build was long outdated and did not work; can revisit in the future * Save output (#81) * first pass * update default financial config files in tests to work with current HOPP * update required hopp version * lower case hopp in .toml * remove support for python 3.9 * update model year to 2022 * specify equation year for steel * remove work towards dynamic cost year for steel and ammonia * update changelog * trying to get save working * working io for greenheart output * update io to work with ammonia and steel * working with ammonia and steel finance * revert steel.py changes * revert openmdao.py changes * update changelog and docstring * add PyYAML to .toml * remove temp file * remove unnecessary input to and update doc string for and * simplify IO control flow * adjust logic so numpy types are caught before checking for python native types * adjust io tests comparison to work in python 3.10 * fix ignore catch in test * make greenheart output loader a class method * make if statements in standalone * remove old commented doc string and duplicate pandas setting call --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> * Figure label naming (#85) * update all figure data labels to use sentence capitalization * update from 'tonne' and 'metric tonne' to 'metric ton' as per direction from NREL communications team * Expanding GreenHEART docs to include how to add a new tech (#89) * Remove reference plants from examples (#87) * remove reference plants from examples * update changelog * update examples readme --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> * Plots (#84) * include plots * update doc strings * add show and save parameters * update plot size, bounds, and labels * onshore plots working * make all labels and names and legends sentence case * updated plot scaling * update changelog * update example 01 with plot * provide default data path and resize figure * remove duplicate plot * update to specify that electrolyzers in these figures are hydrogen electrolyzers * Fixing units bug on plotting * fix scaling * updated example with energy flow plot working * updated example with energy flow plot working --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> * Plots update h2 dispatch (#95) * include plots * update doc strings * add show and save parameters * update plot size, bounds, and labels * onshore plots working * make all labels and names and legends sentence case * updated plot scaling * update changelog * update example 01 with plot * provide default data path and resize figure * remove duplicate plot * update to specify that electrolyzers in these figures are hydrogen electrolyzers * Fixing units bug on plotting * fix scaling * updated example with energy flow plot working * updated example with energy flow plot working * shift energy flow plot to use h2 demand from sizing function * update changelog * update doc string --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> * Update CONTRIBUTING.md * Create build_book.sh * Update CONTRIBUTING.md * Update pyproject.toml * Update pyproject.toml * LCOH Update and Custom Electrolyzer Costs (#79) * updated lcoh calc for to be more aligned with GS methodology * fixed circular import error with electrolyzer cost tools * ran formatter on new file * ran formatter on modified files * formatted * actually fixed for tests * updated tests with new values * modified adjust_dollar_year to be able to take in dictionaries or lists too * updated electrolyzer cost tools integrated variable om * updated example input files * updated test input files for test_greensteel * added test for custom PEM cost function * changed input for custom pem cost * update test input file * adjusted openmdao test assert * added profast_reverse_tools functions * added some docstrings to new functions * added more doc strings to profast tools * updated input file to fix tests * updated doc strings and refurb period in electrolyzer output config * moved setting default installation time to setup_greenheart * updated variable names in finance.py and added doc strings to pem cost functions and put userwarning in electrolysis * removed unused functions from profast tools * renamed fixed om name in custom pem cost test input * Updated optimization test to be better posed * changed warning format in electrolysis.py * minor changes from review * updated formatting units in comments in pem_cost_tools.py * removed commented out code and updated some docstrings * Changed custom to basic_custom for PEM costs --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> * Update PEM efficiency to 51.0 kWh/kg from 54.6 kWh/kg (#102) * update PEM efficiency * update test values for new PEM efficiency * update examples/docs * update the changelog * Updates for HOPP v3.2.0, update PySAM version to 6.0+ (#104) * Updates for HOPP v3.2.0 * Updated all floris-running tests with layout_mode per HOPP v3.2.0 change * Updated more floris-running tests with layout_mode per HOPP v3.2.0 change * Updated wave-related tests due to pysam updates * CRF/WACC/ProFAST Solution (#105) * get and save full profast solution output * update tests * update change log * Rename legacy GreenHEART to H2Integrate (#106) * rename greenheart to h2integrate within files * rename greenheart to h2integrate in the docs * rename greenheart to h2integrate in the examples * rename greenheart to h2integrate in code and tests * pre-commit updates * additional renaming updates * Update CHANGELOG.md * Pinned orbit version (#108) * Pinned floris version * Adding iron capabilities to GreenHEART (#90) * Initial changes from before greenheart split * Saving 'checkpoint' pickles * Adding Stinn model for costs * Adding csv to yaml tool * Pulled Rosner model inputs and coeffs into .csvs * Created 4 new files based on iron.py, one for each step in process (ore mining, ore preprocessing, electrowinning, and post processing) * Updating greenheart_simulation.py to import and use iron ore, pre, win, and post files from previous commit * Costs synchronized between Rosner model and placeholder * Keep example script running * Moving Stinn to named folder * Adding templates for future work * Added modular_iron switch * add Rosner cost models * update performance coeffs and ensure each tech in Rosner runs * update cost model with ng feedstocks * Refactored Stinn cost model * Changing location and lcoe and lcoh * get lin and exp for power fit * capital cost updates * refit cost curve, including peters model * remove unnecessary file * Save pkls to nice subdirectories * ng dri coeffs * refit coeffs ng dri * Mapping online * Mapping in greenheart, can't skip webcall yet * Mapping iron * Ore working in ProFAST * Rosner running with finance_model * Modular working * remove unused files * mapping ore and iron * updating rosner models to be modular * iron post financial model * ng eaf * Mapping points without arcgis * Combined map * updated openmdao import to fix bug with install * added profast tools * moved saving and loading previous data to individual functions * load in pf instance * equivalent lco for dri_eaf and dri with eaf * remove to_csv * moved all saving and loading results to external script functions * added ability for user to input lcoe,lcoh and annual h2 * Moving maps out of greenheart * Fixing indent of hydrogen_amount_kgpy * Fix for amiguous truth value of empty array * Updating GreenHEART files for H2 DRI and NG DRI * Correcting failing pytests, removed passing of iron_performance in utilities.py and added iron_out_fn to greenheart_config to easily open iron_performance results in lca calculations * Quality checked models with Rosner Ore and Rosner Override * lunch * LCA multiprocessing and mapping (with error) * Making run_example_plant run * Fixed column in top_down_coeffs * All geography calculated * debugging after name change * WIP: converting to functions nicely for iron in greenheart simulation * Updating names from pre_iron to run_full_simulation * Removed erroneous prints * rename to fit typical gh naming convention * update necessary naming for iron model runs * add iron tests * test full iron run * fix tests * Pulling wind and solar annual energies out of hopp_results within run_physics * added return to greenheart simulation * remove copy files * fix type * Working through pre-commit issues * WIP: fixing other pre-commit issues * docstrings * WIP: handling pre-commit issues * Renaming capitalized directories for Windows compatability * Fixed kwarg dataclass default for dict * Fixed path error for python 3.10 * Added a check for iron win or iron post product selection * Docstring cleanup and pickle saving refactoring * Fixed import path * Fixed logic check for test * Added changelog notes * Expanded changelog * Removing unused files, adding precision to tests * Trying to resolve merge issues * Setting the power curve in floris * Removing debt_equity_split * Removing iron carbon intensity test * Adding coke and lime emissions to iron h2_dri_eaf and ng_dri_eaf * Renamed sim file utils * Rearranging files for iron * Fixed import * Fixing pre-commit errors * fixing pre-commit errors in h2integrate_simulation.py * Passing, missing coke GREET values * Bringing coke back in * Addressing cbay comments * Added docstrings to h2integrate_simulation * Added missing vars to docstrings --------- Co-authored-by: jmartin4 <jonathan.martin@nrel.gov> Co-authored-by: Jonathan Martin <94018654+jmartin4nrel@users.noreply.github.com> Co-authored-by: Dakota Ramos <dakota.ramos@nrel.gov> Co-authored-by: kbrunik <kbrunik@gmail.com> Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com> Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com> * release v0.2 prep --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com> Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com> Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com> Co-authored-by: Chris Bay <12664940+bayc@users.noreply.github.com> Co-authored-by: jmartin4 <jonathan.martin@nrel.gov> Co-authored-by: Jonathan Martin <94018654+jmartin4nrel@users.noreply.github.com> Co-authored-by: Dakota Ramos <dakota.ramos@nrel.gov> Co-authored-by: kbrunik <kbrunik@gmail.com>






Include plotting functionality for greenheart output
This PR provides a few plotting options based on the
energy_flows.csvdata output from greenheart to visualize the electricity and hydrogen dispatch/flow/production independently and together. There are certainly better ways this could be done, but I'm not sure how far to go given the impending changes.PR Checklist
CHANGELOG.mdhas been updated to describe the changes made in this PRdocs/files are up-to-date, or added when necessaryRelated issues
Impacted areas of the software
examples/01-green-hydrogen.ipynb: add example of using the new plotsgreenheart/tools/eco/utilities.pyvisualize_plant: adjustments for slightly more automatic scaling and better looking plots for onshore and offshoregreenheart/tools/plot.pyget_hour_from_datetimeplot_hydrogen_flows: new functionplot_energy_flows: new functionplot_energy: new functionAdditional supporting information
Test results, if applicable