Replace HOPP Examples that use PVWatts and PySAM Windpower with H2I Wrappers#449
Merged
johnjasa merged 6 commits intoNatLabRockies:developfrom Jan 15, 2026
Merged
Conversation
kbrunik
approved these changes
Jan 13, 2026
Collaborator
kbrunik
left a comment
There was a problem hiding this comment.
Looks great to me! Thanks for working on this
johnjasa
approved these changes
Jan 15, 2026
Collaborator
johnjasa
left a comment
There was a problem hiding this comment.
Great simplification of these examples! Love moving away from HOPP in the examples.
RHammond2
added a commit
that referenced
this pull request
Feb 10, 2026
* added wind turbine export tools * added docstrings * updated for bugfix in turbine models library * pesky inits * correct location comments * allow electrolyzer refurb schedule to work with prefix matching in tech name for electrolyzer instead or requiring an exact match * NumPy Version Update (#422) * numpy fix wip * Updating for numpy release * Updates for numpy * numpy fixes * changelog * revert ci change --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> * renamed write_readable_yaml and minor update to dict_to_yaml formatting to handle NoneTypes * added doc page for turbine model library preprocessing * WOMBAT Version Update (#425) * update test values for wombat version bump * update unit test * Rename capacity input and output of PV model to not include units (#427) * renamed solar capacity inputs and outputs to not have units in name * change to name to system_capacity_X --------- Co-authored-by: kbrunik <kbrunik@gmail.com> * Iron: Standalone Iron Reduction and EAF Models (#409) * added in-progress refactored iron winning models * updated natural gas dri performance model * updated docs in ng iron performance model * updated iron cost model * updated coefficient paths for rosner iron plant models * updated example 21 and fixed bugs that were found * minor updates to dri cost and perf models * added basic tests for new dri models * removed notes from rosner dri test * double checked water costs and unit conversions and cleaned up some small things * renamed ng iron reduction models and configs * renamed ng iron dri files * updated iron example tech config * added h2 dri cost and performance models * added h2 dri models to supported models * update test values for wombat version bump * update unit test * update docstrings * update feedstocks to be per ton pig iron * refactored DRI performance and cost models to share baseclass * updated electricity to not double count * added test for performance with limited feedstock availability * eaf wip * steel tests wip * undo align * minor update on handling negative exponents in steel eaf cost model * added carbon and lime to pipe * update rosner eaf test * draft update to iron example * updated iron example to include steel eaf * updated doc page and changelog * added small test for example 21 * Fix run_iron.py to actually compare old and new * Fixing unit conversion issues * Fixing water-related test values * propagate unit fixes to EAF models * fix integration test * fix comment --------- Co-authored-by: kbrunik <kbrunik@gmail.com> Co-authored-by: John Jasa <johnjasa11@gmail.com> Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com> Co-authored-by: jmartin4 <jonathan.martin@nrel.gov> * fixed units in h2 storage cost model and updated test values (#429) * Iron: Updated Ore Transport Model (#408) * updated iron transport to be compatible with updated iron mine * updated iron transport tests * updated h2i to handle new transport method * new transport pathways. HUZZAH * fix old workflow * updated mine feedstock units in iron example tech config * Fixing run script to compare old and new * minor cleanups to plant config and updated changelog * docstring clean up --------- Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com> Co-authored-by: kbrunik <kbrunik@gmail.com> Co-authored-by: John Jasa <johnjasa11@gmail.com> Co-authored-by: jmartin4 <jonathan.martin@nrel.gov> * moved base config classes to model baseclasses file * GeoH2: Surface Processing (#405) * update performance and cost models * small mods * fix spelling * modify outputs to fit h2i framework * integrated finance * remove old test value * add cost tests * change from well_lifetime to plant_life * use cepci and cpi in mathur model * documentation * Simple surface fit * Fitting h2 out flow * doe running * Generating decision view * Using log fits * Some processing curves working, some not * Surface model complete, not debugged * Removing old csv * Surface model integrated * Sensitivity analysis * Small plot changes * PR Cleanup * Fixing notebook and adding tests * Adding wellhead gas to stimulated model * Fixing ipynb * Writing more documentation * Apply suggestions from code review Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Refactoring the ASPEN surface modeling files * Minor refactoring to curve fit setup * pr feedback * minor updates to load_coeffs and refit_coeffs * big refactor on refit_coeffs function * minor refactoring in AspenGeoH2 models * moved geoh2 integration tests and added initial geoh2 unit tests * fixed unit tets and fixed bug in refit coeff * removed some commented out code * reformatted accessing values in geoh2 tests * fix precommit * Fixing surface plotting * small changes * Fixing test --------- Co-authored-by: kbrunik <kbrunik@gmail.com> Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com> Co-authored-by: John Jasa <johnjasa11@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com> * Minor docs typo * Baseclass for Caching Functionality (#424) * added cache baseclass and implemented in hopp wrapper --------- Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com> Co-authored-by: John Jasa <johnjasa11@gmail.com> * Docstring cleanup * updated import error in geoh2 baseclass * Added FLORIS wind plant model (#372) * added floris wind model * added in wind resource tools * added test for preprocessing turbine tools with floris --------- Co-authored-by: kbrunik <kbrunik@gmail.com> Co-authored-by: John Jasa <johnjasa11@gmail.com> * Remove duplicate files (#446) * removed example 13 and updated test_framework test to use example 7 * removed unused floris files from example 2 and 12 * removed unused floris turbine file from Example 25 * removed ex 13 test from test_all_examples * removed duplicated floris files for osw 15 MW * removed duplicated floris_input_lbw_6MW and updated filepaths in example 2 and 12 * removed duplicate default_fin_config for examples 9 and 17 * removed duplicate default_fin_config files in example 3 and updated paths * updated example 3, 12, and 25 to use resource files in example 2 * Replace HOPP with FLORIS Wrapper in Example 17 and Example 9 (#448) * updated example 17 to use floris wrapper instead of hopp * updated example 9 with oae finance * turned on caching for the updated examples * Added start time, end time, and dt to resource data outputs (#438) * added method to add string representations of start and end time of resource data to resource data output dictionary --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> * Minor refactor to profast tools org (#450) * Start example 05 feasible (#452) * Updated example to be simpler * Updated test values * Fixed updated test * fixed typo in solar resource doc page (#455) * Removing defunct tank class (#457) * Removing defunct tank baseclass * Removing defunct tank baseclass * Add missing doc figure (#458) * Added missing image for docs * Updated image * Replace HOPP Examples that use PVWatts and PySAM Windpower with H2I Wrappers (#449) * updated example 03 hydrogenation doc to use PySAM wind model * added wind resource file for example 3 hydrogenation doc * updated example 3 hydrogenation to use h2i models * removed commented out hopp in example file --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> * Replace battery in HOPP with battery in H2I (5 examples) (#451) * updated example 1, tests still failing * updated example 1 and example 2 to use h2i battery * updated example 09_co2/direct_ocean_capture * updated example 12 * removed commented out code from hopp configs * fixed failing test --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> * Replace HOPP with H2I models in 5 examples (#461) * removed commented out code from ex 17 * updated example 1 to use pvwatts and floris * fixed wind costs in example 1 * updated example 2 * added subtests to example 1 and changed turbine file for example 1 * added more subtests for example 1 * updated test values for example 2 * updated test values for example 2 * added 6 MW turbine * updated example 12 and its tests * removed unused srw wind resource files * removed old floris turbine model file and updated example 1 tests * updated example 9 * other cleanups and updated other tests that used example 1 * updated to prevent failing tests * Add csv post process for time series variables (#440) * Add csv post process for time series variables * Rename and move to postprocesss folder * Clean up function file * Fis ruff formatting * added alternative approach to saving timeseries data * added docstrings and comments to new methods * Add column renaming ability * Add alternative varibale name capability * bugfix in set_recorders * added timeseries saving to example 2 and removed post_process * Fix ruff issue, delete old code * Sort import statements * Unsort import statements * Add line * added basic tests for saving timeseries results * Add test for alternative column names and adjust alternative column name logic * fix formatting * update test name * Add unit and alternative name test * updated CHANGELOG * renamed new files and updated import statements * Minor comment updates * minor updates based on feedback * Add to docs * Update Ex 2 and docs * minor updates to doc page for formatting * updated test since merged in develop * Added doc content to address review feedback --------- Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com> Co-authored-by: John Jasa <johnjasa11@gmail.com> * Minor: Updated postprocess test to set the demand profile if running example 2 (#466) * updated postprocess test to set the demand profile if running example 2 * replaced hopp with combiner in example 2 runfile * OpenMETEO Historical Solar Resource Model (#459) * replaced empty compute method in openmeteo_wind * added openmeteo solar model * added integration test of openmeteo solar with pvwatts * added openmeteo solar to supported models * added handling if resource data is downloaded from web * added check if albedo is NaNs * added doc pages for openmeteo solar * fixed failing test * Enable multiple site functionality (#434) * first pass at enabling multisites * added site models * integrate usage of site models * minor update to resource to tech connection logic * minor update to resource to tech connection logic fixed * updated plant schema and load_plant_yaml * updated example input files with unused site inputs * updated example 15 and bugfix for site_groups in connect_technolgoies * added example for new functionality * fixed failing test * removed site boundary component * added wind resource file for new example * updated new example and added integration test * minor refactoring and reorganizing * renamed site_groups to sites * updated example 1 and 2 plant configs * updated example plant configs * removed compatibility with previous site definition * added doc strings to new methods in H2IntegrateModel * added doc pages and fixed failing tests * updated starting wind site to prevent API download error in new example * bugfix in sitebasecomponent and updated setup for test_iron_transport * expanded example 26 and added subtests * updated wind turbine preprocessing tool tests for changes to ex 26 * updated example name * Minor edits to doc file * updated doc page and added more comments to new and updated examples * Minor doc formatting changes --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> Co-authored-by: Genevieve Starke <genevieve.starke@nrel.gov> * Updating docs with pre-commit info (#472) * Updating docs with pre-commit info * Apply suggestions from code review * Make entry uniform --------- Co-authored-by: John Jasa <john.jasa@nrel.gov> * Enhancement: Update `pyproject.toml` (#471) * remove ignore rules for nonexistent files * upgrade linting/formatting settings and unused packages * update changelog * rerun linting * remove floris restriction * Recreate iron mapping functionality (#413) * refactor of iron mapping functionality, need to update docs * correcting references to local file paths, updated save file logic and supplemented in code comments * Correcting default argument behavior and adding utilities.find_file() use * refactored code with GeospatialMapConfig class, added doc strings, functionalized repeat code" * running pre-commit hooks * updating bool values for default behavior * Adding examples/26_iron_map * correcting doc strings for GeospatialMapConfig * updating README.md and environment.yml with necessary conda install commands for geopandas and contextily * Updating ore and shipping prices to $/kg * update examples/26_iron_map/run_iron.py with correct units and explicit call out of colorbar_limits * add colorbar_limits attribute to GeospatialMapConfig, added helper function to auto set the colorbar and colormap limits if None provided, passing plt.Normalize object to both the colormap and colorbar objects so both are normalized to the same range * correcting example_ore_prices.csv * Updating doc strings, refactored some logic to make it more readable in mapping.py * added test_26_iron_map_example() in test_all_examples.py * updated pyproject.toml with geopandas and contextily in [.examples], corrected environment.yaml and readme.md accordingly * Adding docs/user_guide docs page for iron mapping functionality * updating docs/_toc.yml to include new docs page * resolving conflicts for merge * updated CHANGELOG.md * Update docs/_toc.yml correcting typo Co-authored-by: John Jasa <john.jasa@nrel.gov> * resolving merge on CHANGELOG.md * Updating files paths to use ROOT_DIR and EXAMPLE_DIR, removed extra shipping_coords.csv, renamed from 26_iron to 27_iron to avoid conflict * correcting type in filepaths * updating pyproject.toml and ci.yml for failing test * force git tracking of cases.csv for use in pytest to avoid having to run iron_map model to produce cases.sql * removing commented code from test_27_iron_map_example() * updating map_preferences default value = None, removing excess inline code documentation * simplifying extra step to convert results geodataframes to web marcator projection * simplified setting of vmin and vmax * removed unnecessary check for save_plot_fpath as Path object * removing uncessary tuple brackets around string checks * updating multiline string comments for traceback legibility * simplifying fig,ax,base_layer_gdf object check * simplifying validate_gdfs_are_same_crs() * simplifying auto_detect_lat_long_columns() logic * updating colorbar_limits definition and attrs validation * attempt to resolve failed CI test * updating example driver_config.yaml run_parallel = False * Update examples/27_iron_map/run_iron.py committing Jonathans updates Co-authored-by: Jonathan Martin <94018654+jmartin4nrel@users.noreply.github.com> * Update examples/27_iron_map/run_iron.py Co-authored-by: Jonathan Martin <94018654+jmartin4nrel@users.noreply.github.com> * Update examples/27_iron_map/run_iron.py Co-authored-by: Jonathan Martin <94018654+jmartin4nrel@users.noreply.github.com> * Update examples/27_iron_map/run_iron.py Co-authored-by: Jonathan Martin <94018654+jmartin4nrel@users.noreply.github.com> * correcting pre-commit errors * updating colorbar_limits typing and validators to accept integers * correcting GeospatialMapconfig instantiation * updating docs md * adding install guidance to docs md * adding install guidance to docs md * adding try except block for geopandas and contextily imports * updating run_iron.py comments and adding dpi argument for saving plots * correcting failed test * adding save_plot_dpi argument to run_iron.py * minor updates to mapping.py, added unit tests for mapping helper functions * minor updates to mapping.py, added unit tests for mapping helper functions * updating to examples 28 * adding example 28 output cases.csv for tests * Minor linting updates * Minor doc update --------- Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com> Co-authored-by: John Jasa <john.jasa@nrel.gov> Co-authored-by: John Jasa <johnjasa11@gmail.com> Co-authored-by: Jonathan Martin <94018654+jmartin4nrel@users.noreply.github.com> * Docs: Convert notebooks to scripts and executable markdown (#464) * replace docs notebooks with executable markdown for simple diffs * add notebook conversion commentary * update changelog * update gitignore for notebook output * add _autosummary to gitignore * replace the example notebook with basic script and move the demo to the docs * update changelog * update markdown formatting * near complete revamp of run_csv_doe.ipynb * get doe example working * replace notebook with Python script * update bad import * update gitignore for DOE driver configs * run example from top * replace sizing notebook with executable markdown, and get it running * add sphinx flag to ensure failed executable cells cause a build error * remove cases.sql parent directory output data * convert notebook to script, stripping much of the narrative * update changelog * add \ in front of $ to avoid latex in markdown * update docs example for updated example * Updated literal lincludes for yamls in docs --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> * Load resource data from a folder without subdirectories of the resource type (#462) * added functionality so resource files dont have to be loaded from a folder with a subdir named as the resource type * added warning to resource baseclass and updated warning filters in electrolyzer models * Simplified resource error handling --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> * Fix: MIssing dependencies for local test runners (#478) * fix missing deps for gis packages in tests * update changelog * Fix: Update pytest version pinning for archival of `pytest-subtests` (#483) * remove now deprecated pytest-subtests * update changelog * update indentation * Simplify debugging of configuration errors during setup (#479) * add additional class name input to for enhanced logging * update calling of all config classes to include calling clas name * add tests for BaseConfig.from_dict * update changelog --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> * Make verification of openmeteo resource download a configurable parameter (#482) * added verify_download bool to openmeteo resource config classes * typo fix --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> * Standardize performance model outputs (#463) * added draft of performance model baseclass to set outputs * updated wind models for standardized outputs * minor cleanup to wind pysam * minor cleanup to floris outputs * updated outputs of hydroplant * updated solar pv models for standardized outputs * updated solar resource integration tests with updated solar model outputs * added fraction_of_year_simulated attribute to performance baseclass * updated tests for turbine preprocessing tools * fixed variable naming in test_all_examples for wind and solar * started updating electrolyzer model outputs * minor bugfix to test_sql_timeseries_to_csv for example 2 * fixed save_case_timeseries_as_csv * update to sql_to_csv function just in case * added attribute check in PerformanceModelBaseClass * typo bugfix in refurb period calc in electrolyzer model * added test for solar performance baseclass * added solar test to check that all outputs are set in parent class * commented out unused variables in new solar test * generalized solar unit test so it can be easily used for other components * updated natural gas plant * started updating co2 models * updated grid model * updated asu model * updated grid tests * updated desal model * updated co2 models and tests * updated newest steel models * started updating methanol models but not tested * made it so ResizablePerformanceModelBaseClass inherits PerformanceModelBaseClass * updated electrolyzer model and ammonia synloop model * updated simple ammonia model * updated hopp wrapper * updated steel.py * updated iron mine and dri models * updated geoh2 models * updated battery * added todo comments to storage models * added unit tests to check that outputs are populated * working on updating combiners and h2imodel * updated electrolyzer so test values dont change and other bugfixes so examples run * updated how_to_set_up_an_analysis.md * removed init file from new hydro power test folder * updated remaining failing tests * updated example 28 and iron_wrapper * updated capacity factor strings in run_size_modes files * removed commented out outputs * updated changelog * removed duplicate inheritance of PerformanceModelBaseClass in electrolyzer performance baseclass * updated pysam battery outputs * updated annual outputs to properly account for fraction of year simulated * moved commodity defn to initialize * updates based on reviewer feedback --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> * Enhancement: Convert `supported_models` to enforce actual class names (#468) * replace resource model naming conventions and first third of converter models * fix broken import * replce hopp shorthand with class name * iron -> IronComponent * update iron mine models * update iron plant * update martin iron model * replace rosner models * convert ng/h2 EAF models * convert reverse osmosis desal * convert ammonia syn loop models * convert steel converter models * update smr methonal models * update co2 methanol converters * update direct ocean capture converters * update OAE converters * update geoh2 models * update ng converters * cable -> CablePerformanceModel * Revert "cable -> CablePerformanceModel" This reverts commit 522a2e3. * replace summers * update pysam battery storage model * update storage auto sizing * update cavern storage * update mchtol and pipe storage * update atb battery * update generic storage models * fix import * update controller model references * convert dispatch model names * convert grid model names * replace ProFastComp naming * fix misapplied hopp name change * convert combiner, splitter and transport performance model names * update iron transport cost component model naming * replce feedstock naming, and update feedstock model check * reinstate subsystem naming conventions * update changelog * update gitignore for more examples outputs * fix bad merge conflict resolutions for mult-site examples * fix new examples * update new iron example and remove duplicate key * update supported models docs about naming conventions * add test for supported models matching name enforcement * update ammonia model names * update changelog --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> * updated gitignore (#495) * Fix/floris (#499) * add timezone to floris example * Ard integration for wind farm combined performance and cost model (#312) * working on ard integration * wip ard integration * fix syntax * wip: ard integration needs full year wind data * add wind resource with api capability * update type for resource_config option * move ard tests into a new subfolder * wip ard integration stuck at needing time-series * add test for ard * wip debuggin ard integration * update ard example for some refactor * add resource request * inputs for example * remove jared's attempt at wind resource integration * wip: add ard example * get ard example working * wip: debugging tests * update docs and changelog * include ard in pyproject.toml dependencies * include ard in tech overview * install ard from PyPI * remove duplicate test. update docs * update naming in ard example * Minor docstring and Ard edits * wip: converting to use h2i resource management for wind * working through pre-commit * apple silicon install instructions wip * update ard barnch to work with new develop branch * cleaning up * clean up example and test values for Ard * more cleanup * set verify back to False for OpenMeteo solar api call * update documentation * include solar file for ard example * add ard unit tests * adjust test value units to reduce the number of relevant significant figures * add visualizations to ard example * update test tolerances * correct NREL ref to NLR * move ard example solar file to resource_files/solar * add ard dummy cost model tests and specify n2 filenames in ard example * update example with a number * update paths * update supported model naming and work on performance model base class compatibility * wip updating ard performance model compatibility * update ard integration to be compatible with new required performance model oututs * doc update and small reorg * update finance and control model names * include OpenMeteo solar api in supported models and minor test updates * move commodity and units in ard to initialize method * correct aep calculation --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com> * Expose cost numbers for generic storage model (#503) * Minor fixes and added cost inputs to custom electrolyzer cost model (#511) * updated limiting_input shape for ammonia synloop * added cost inputs for custom electrolyzer cost model * fixed and added units to generic storage cost model cost inputs * allow None type unit specification in driver config and switch design… (#514) * allow None type unit specification in driver config and switch design variable units to None in Ard example 29 * update changelog * Make Ard an optional dependency (#515) * added ability to run H2I if ard isnt installed * update dependency stack for optional ard * update error messages for Ard imports * update changelog to reflect optional Ard * update environment.yml --------- Co-authored-by: Hammond, Rob <13874373+RHammond2@users.noreply.github.com> Co-authored-by: John Jasa <johnjasa11@gmail.com> * Maintenance: Update CI Workflows (#500) * update actions and python versions for testing and remove gis * update pre-commit for PRs and pushes to main/dev and use python 3.13 * use latest actions/checkout * update python for pypi publishing runners * update python in docs * remove docs testing now that we have RTD builds * remove flake8 in place of pre-commit on PRs * remove gh pages since RTD exists * update for python 3.13 max--not 3.14 * reenable pytest settings * add sort of working file cleanup fixture * convert feedstock to pytest * spacing * Revert "update for python 3.13 max--not 3.14" This reverts commit af923a0. * xRevert "reenable pytest settings" This reverts commit ea87275. * update for python 3.13 max--not 3.14 * remove erroneously committed changes * remove hopp develop branch installation * update installation instructions and markdown formatting --------- Co-authored-by: John Jasa <johnjasa11@gmail.com> * Update changelog ahead of release (#516) * Updating changelog * Grouped changelog entries * bump version for release --------- Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com> Co-authored-by: kbrunik <kbrunik@gmail.com> Co-authored-by: John Jasa <johnjasa11@gmail.com> Co-authored-by: Jared Thomas <jaredthomas68@gmail.com> Co-authored-by: kbrunik <102193481+kbrunik@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: Copilot <175728472+Copilot@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: John Jasa <john.jasa@nrel.gov> Co-authored-by: Dakota Sky Ramos <85905407+dakotaramos@users.noreply.github.com> Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace HOPP Examples that use PVWatts and PySAM Windpower with H2I Wrappers
Two examples (
03_methanol/co2_hydrogenationand03_methanol/co2_hydrogenation_doc) use HOPP to run wind and solar models that are available in H2I.03_methanol/co2_hydrogenationused wind and solar models in PySAM,03_methanol/co2_hydrogenation_docused HOPP to run the wind model in PySAM. I replaced the usage of HOPP with instead using the H2I wrappers of the PVWattsv8 and Windpower module in H2I.Section 1: Type of Contribution
Section 2: Draft PR Checklist
Type of Reviewer Feedback Requested (on Draft PR)
Structural feedback:
Implementation feedback:
Other feedback:
Section 3: General PR Checklist
docs/files are up-to-date, or added when necessaryCHANGELOG.mdhas been updated to describe the changes made in this PRSection 3: Related Issues
Section 4: Impacted Areas of the Software
Section 4.1: New Files
resource_files/wind/29.2_-94.6_2013_wtk_v2_60min_utc_tz.csv: wind resource file for03_methanol/co2_hydrogenation_docresource_files/wind/32.31714_-100.18_2013_wtk_v2_60min_utc_tz.csv: wind resource file for03_methanol/co2_hydrogenationresource_files/solar/32.31714_-100.18_2013_goes_aggregated_v4_60min_utc_tz.csv: solar resource file for03_methanol/co2_hydrogenationSection 4.2: Modified Files
examples/03_methanol/co2_hydrogenation_doc/tech_config_co2h.yaml: replaced hopp with H2I wrapper of PySAM Windpower moduleexamples/03_methanol/co2_hydrogenation_doc/plant_config_co2h.yaml: replaced 'hopp' with 'wind', added in resource to site, and addedresource_to_tech_connectionsexamples/03_methanol/co2_hydrogenation/plant_config_co2h.yaml: replaced 'hopp' with 'wind', 'solar', and a combiner added in resource to site, and addedresource_to_tech_connectionsexamples/03_methanol/co2_hydrogenation/tech_config_co2h.yaml: replaced hopp with H2I wrapper of PySAM Windpower module and PySAM PvWattsv8 module, added a combinerexamples/test/test_all_examples.py::test_co2h_methanol_example: updated test value for example03_methanol/co2_hydrogenation. LCOM increased from 1.3812 to 1.7556examples/test/test_all_examples.py::test_doc_methanol_example: updated test value for example03_methanol/co2_hydrogenation_doc. LCOM decreased from 2.58989518 to 2.52525883Section 4.3: Removed Files
examples/03_methanol/co2_hydrogenation/tech_inputs/hopp_config.yaml: hopp config file for03_methanol/co2_hydrogenationexamples/03_methanol/co2_hydrogenation_doc/tech_inputs/weather/solar/29.2_-94.6_psmv3_60_2013.csv: unused solar resource file for03_methanol/co2_hydrogenation_docexamples/03_methanol/co2_hydrogenation_doc/tech_inputs/weather/wind/29.2_-94.6_windtoolkit_2013_60min_100m_120m.srw: wind resource file used in03_methanol/co2_hydrogenation_docexamples/03_methanol/co2_hydrogenation_doc/tech_inputs/hopp_config.yaml: hopp config file for03_methanol/co2_hydrogenation_docSection 5: Additional Supporting Information
Section 6: Test Results, if applicable
examples/test/test_all_examples.py::test_co2h_methanol_example: LCOM increased from 1.3812 to 1.7556. This is likely due to reductions in average electricity production which could result from both changes in resource data, wind layout impacting results, small differences in the latitude used to calculate the solar panel tilt angle.examples/test/test_all_examples.py::test_doc_methanol_example: LCOM decreased from 2.58989518 to 2.52525883. LCOM decrease despite average electricity production could due to changes in the wind generation profile due to small differences in resource data or by using a different wind farm layout. This example uses 15 MW turbines, and the power-curve recalculation with the default rotor diameter for WindPowerSingleOwner model that HOPP uses, only results in a 7.5 MW turbine. This would throw an error in H2I, so I had to specify the rotor diameter to be 240m. This could also result in differences in wind generation profiles. A change in the wind generation profile will impact electrolyzer performance in a nonlinear way.Section 7 (Optional): New Model Checklist
docs/developer_guide/coding_guidelines.mdattrsclass to define theConfigto load in attributes for the modelBaseConfigorCostModelBaseConfiginitialize()method,setup()method,compute()methodCostModelBaseClasssupported_models.pycreate_financial_modelinh2integrate_model.pytest_all_examples.pydocs/user_guide/model_overview.mddocs/section<model_name>.mdis added to the_toc.yml