Skip to content

Conversation

@kbrunik
Copy link
Collaborator

@kbrunik kbrunik commented Aug 12, 2025

Add Ocean Alkalinity Enhancement Model

Add technology model for Ocean Alkalinity Enhancement (OAE). Model includes a performance model, cost model and combined cost and financial model.

The high number of file changes comes from reorganizing the examples so all CO2 technologies and examples live in the same directory. For specific impactful changes see the impacted areas of software section.

PR Checklist

  • CHANGELOG.md has been updated to describe the changes made in this PR
  • Documentation
    • Docstrings are up-to-date
    • Related docs/ files are up-to-date, or added when necessary
    • Documentation has been rebuilt successfully
    • Examples have been updated
  • Tests pass (If not, and this is expected, please elaborate in the tests section)
  • PR description thoroughly describes the new feature, bug fix, etc.

Related issues

Impacted areas of the software

  • changelog.md: Update with technology model.
  • examples/09_co2/: New directory that houses the direct ocean capture and ocean alkalinity enhancement examples. Note there are two examples for OAE because one uses financials built into H2I and the other uses the combined cost and financial model in the OAE converter.
  • converters/co2/marine/direct_ocean_capture
    • DOCPerformanceConfig: Move two attributes from marine_carbon_capture_base_class into DOC since it's not used in OAE.
  • converters/co2/marine/marine_carbon_capture_baseclass
    • MarineCarbonCapturePerformanceConfig: Move two attributes to into DOCPerformanceConfig since it's not used in OAE.
  • converters/co2/marine/ocean_alkalinity_enhancement
    • OAEPerformanceConfig: Extend MarineCarbonCapturePerformanceConfig with necessary inputs for OAE.
    • OAEPerformanceModel: Outputs co2_capture_rate_mt, co2_capture_mtpy as well as various values needed for the cost models.
    • OAECostModel: Calculates the CapEx and OpEx, energy costs are set to zero because otherwise they're incorporated into OpEx costs.
    • OAECostAndFinancialModel: Calculates the CapEx, OpEx, NPV and Carbon Credit Value, takes an input of energy costs.
  • converters/co2/marine/test/test_oae: Test for performance model and import of mcm.
  • core/h2integrate_model: Add logic for connecting OAE.
  • core/supported_models: Added
    • OAEPerformanceModel
    • OAECostModel
    • OAECostAndFinancialModel

Test results, if applicable

@kbrunik kbrunik requested a review from johnjasa August 13, 2025 18:30
@kbrunik kbrunik marked this pull request as ready for review August 13, 2025 18:30
Copy link
Collaborator

@johnjasa johnjasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this! I like the synergy between the DOC and OAE models. Good clear doc page too.

I made some minor typographical changes to the docs and added the financials example to the tests -- but it doesn't run due to a missing weather file. Could you please add that file or remove the tested example? I wasn't sure your intentions there, so I'm leaving it up to you.

@kbrunik kbrunik requested a review from johnjasa August 18, 2025 19:22
@johnjasa
Copy link
Collaborator

Thanks for the changes! Looking great, I'll merge it now.

@johnjasa johnjasa merged commit 000ef68 into NREL:develop Aug 20, 2025
5 checks passed
johnjasa added a commit that referenced this pull request Oct 2, 2025
* Added back to changelog

* Compactifying smr.py

* Moving smr.py directly to methanol classes

* WIP: reformatting methanol classes

* Shifting methanol values to config

* Updating test values due to pysam change

* Refactored input combining methods into one

* Reworked financial group logic to be smoother when techs have their own financial models

* Renamed elec_production to electricity for consistency

* reinstalled pre-commit

* Changed examples so they're tested correctly

* pysam 7.0 updates

* Changed SMR/methanol as a baseclass setup to be more clean

* Updates for pysam 7

* usgs prospectivity map

* Update pyproject.toml

* WIP: removing prior framework

* WIP: cleaning out existing framework

* WIP: removing unused files

* All tests pass

* Renamed a few files from greenheart to h2integrate (#120)

* Renamed a few files from greenheart to h2integrate

* removed openmdao all install

* Updated pysam7 test values

* Expand H2I docs basics (#119)

* WIP: reworking docs

* WIP: expanding getting started docs

* WIP: more docs additions

* Additional docs cleanup

* Freshly built docs

* higher res splash image

* Added to changelog and ruamel yaml

* Removed all on openmdao install

* Updates based on review feedback

* Contour map levels

* updated readme and pr template

* Updating autodocs

* Added missing file

* Testing example values

* Adding geoh2 baseclass based on methanol

* Updated test values

* Made combined geoH2 plant

* Added example files

* Updates due to HOPP version

* Fixing iron data save separation (#122)

* Fixing iron data save separation

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Minor bug-fix to H2_Results and added optional inputs to electrolyzer (#117)

* added ability to initialize electrolyzer curve coefficients

* added test for initializing electrolyzer with curve coeff

* added optional input of water usage rate to electrolyzer

* updated run_h2_PEM to fix outputs if some stacks are never turned on

* updated creation of pem_param_dict in electrolysis.py for new inputs

* updated CHANGELOG

* updated test values in test_greenheart_system that were impacted from pysam update

* minor bug-fix in run_h2_PEM

* updated from reviewer feedback

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Working geoh2 model

* Update to new framework (#123)

* Added initial reference plant design for H2I

* Resolving pre-commit issues

* Added missing example

* Fixed example case imports

* Added initial ammonia ref design

* Updated ammonia example; added config to H2 storage

* Made hydrogen storage a passthrough object

* Updating for H2I migration

* Added test examples for H2I

* Changed examples so they're tested correctly

* Updates for pysam 7

* Update pyproject.toml

* WIP: removing prior framework

* WIP: cleaning out existing framework

* WIP: removing unused files

* All tests pass

* Expand H2I docs basics (#119)

* WIP: reworking docs

* WIP: expanding getting started docs

* WIP: more docs additions

* Additional docs cleanup

* Freshly built docs

* higher res splash image

* Added to changelog and ruamel yaml

* Removed all on openmdao install

* Updates based on review feedback

* updated readme and pr template

* Updating autodocs

* Testing example values

* Updated test values

* Updates due to HOPP version

* Added capability for multiple commodity_types in the same financial group

* Updates for ref design cases

* Bumping version

* Updated changelog

* Changing arrays to scalars

* Updating examples after merge

* Fixing financial stackup

* Taking out geoh2

* Removing geoh2 example

* Kaitlin's review responded to

* Separate CO2H example drafted, not debugged

* Separating example .yaml

* Fixing input description

* Initial Methanol Simulation Example (#116)

* Added initial reference plant design for H2I

* Resolving pre-commit issues

* Resolving pre-commit issues

* Resolving pre-commit issues

* Resolving pre-commit issues

* Added missing example

* Fixed example case imports

* LNG methanol group finance error

* Simple LCOM calc working

* Added initial ammonia ref design

* Updated ammonia example; added config to H2 storage

* Made hydrogen storage a passthrough object

* Updating for H2I migration

* Added test examples for H2I

* Running with h2i merge

* Deleting gh files

* Reading in methanol performance variables as table

* Attempting to trigger precommit - was not installed on last commit

* Splitting off SMR

* Fixing methanol 'plant' semantics

* SMR model matching ACS paper

* Docstrings added

* Numbering methanol example

* PR cleanup

* Delete h2i_examples/0X_methanol/run_methanol_out/reports/n2.html

Was unable to delete locally, git tracking issue?

* Delete h2i_examples/0X_methanol/run_methanol_out/reports/inputs.html

Was unable to delete locally, git tracking issue?

* Added back to changelog

* Compactifying smr.py

* Moving smr.py directly to methanol classes

* WIP: reformatting methanol classes

* Shifting methanol values to config

* Updating test values due to pysam change

* Refactored input combining methods into one

* Reworked financial group logic to be smoother when techs have their own financial models

* Renamed elec_production to electricity for consistency

* reinstalled pre-commit

* Changed examples so they're tested correctly

* pysam 7.0 updates

* Changed SMR/methanol as a baseclass setup to be more clean

* Updates for pysam 7

* usgs prospectivity map

* Update pyproject.toml

* WIP: removing prior framework

* WIP: cleaning out existing framework

* WIP: removing unused files

* All tests pass

* Expand H2I docs basics (#119)

* WIP: reworking docs

* WIP: expanding getting started docs

* WIP: more docs additions

* Additional docs cleanup

* Freshly built docs

* higher res splash image

* Added to changelog and ruamel yaml

* Removed all on openmdao install

* Updates based on review feedback

* Contour map levels

* updated readme and pr template

* Updating autodocs

* Added missing file

* Testing example values

* Adding geoh2 baseclass based on methanol

* Updated test values

* Made combined geoH2 plant

* Added example files

* Updates due to HOPP version

* Working geoh2 model

* Changing arrays to scalars

* Updating examples after merge

* Fixing financial stackup

* Taking out geoh2

* Removing geoh2 example

* Kaitlin's review responded to

* Fixing input description

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Add an optimization example and constraint capabilities (#126)

* Added wind+H2 optimization example and constraint capabilities

* Updated changelog

* Fixed quotes

* Updated opt example bounds

* Updated opt example

* Fixed test syntax

* Added doc page on optimization

* Added note clarifying optimization types supported

* Add custom model capabilities and an example (#128)

* Added custom model capabilities and a paper mill example

* Added custom model capabilities and a paper mill example

* Updated custom model logic

* Moved paper_mill location per Jonathan's suggestion

* WIP custom model docs

* update link

* Added missing paper mill file

* updated custom model due to renaming

---------

Co-authored-by: kbrunik <kbrunik@gmail.com>

* Connected methanol tech example

* remove `to_organize` directory (#138)

* remove import of simple_cash_annuals that was not being used anyway

* update changelog

* revert back to versions in develop

* run pre-commit hooks

* run pre-commit hooks

* Docs: Add Read the Docs configuration (#142)

* add rtd config

* Rename .readthedocs.yml to .readthedocs.yaml

* MCH hydrogen storage cost model (#131)

* added MCH hydrogen storage cost model

* added test for mch cost model and added docstrings

* added changes to CHANGELOG

* updated mch tests

* Refactored parts of the MCH model

* updated mch cost based on feedback

* Added note to the MCH costs test

* Updates for OM 3.39

* Updates for OM 3.39

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Split electrolyzer cost models (#147)

* Splitting out ECO cost models into two models

* Added singlitico and basic cost model files

* Updated 05 example to use basic cost model

* updated changelog

* Updates for CI

* Fixed opt example

* Made all produced or consumed resources have _in and _out appended (#148)

* Made all resources have _in and _out appended

* Added to changelog

* Bump min Python version and remove unnecessary packages from pyproject.toml (#150)

* WIP updating package list

* Updating pyproject.toml

* Bumping min python version

* Updated changelog

* Updated readme for Python versions

* Removed pinned orbit version

* Added <3.14 to python

* Add a simple run of river hydro plant model (#145)

* WIP hydro

* WIP: adding river resource

* Fixed bug in river resource nan handling for upsampling

* Adding run of river docs

* Downsized the river map image

* Added a test for run of river

* documentation

* jpg

* add details

* Added check for length of outputted river info

* Reformulating resource connections

* Addressing review feedback

---------

Co-authored-by: kbrunik <kbrunik@gmail.com>

* Added docs on replacing config values in Python memory (#151)

* Added docs on replacing config values in Python memory

* Updated changelog

* Added simpler example for the overwriting doc page which will be generally useful as well

* Running with hydrogen sizer (incorrect LCOM)

* Code review guidelines (#156)

* Added code review notes based on our discussion

* Updated splash image

* remove extra punctuation

---------

Co-authored-by: bayc <christopher.j.bay@gmail.com>

* CO2H model connected to electrolyzer

* Added a check for if a custom model has a name clash (#162)

* Renaming size to size_upstream

* Revamping ammonia production models (#163)

* Removing defunct ammonia functions and updating feedstock setup

* Refactoring existing ammonia model

* Removing defaults for the ammonia config

* Adding initial synloop model

* Added simple ammonia test

* Added ammonia symloop test

* Reconfiguring ammonia symloop test

* Updated ammonia example test

* Removed ammonia from docs

* Removed autosummary docs

* Updating per review

* Geologic Hydrogen Initial Example (#135)

* Added initial reference plant design for H2I

* Resolving pre-commit issues

* Resolving pre-commit issues

* Resolving pre-commit issues

* Resolving pre-commit issues

* Added missing example

* Fixed example case imports

* LNG methanol group finance error

* Simple LCOM calc working

* Added initial ammonia ref design

* Updated ammonia example; added config to H2 storage

* Made hydrogen storage a passthrough object

* Updating for H2I migration

* Added test examples for H2I

* Running with h2i merge

* Deleting gh files

* Reading in methanol performance variables as table

* Attempting to trigger precommit - was not installed on last commit

* Splitting off SMR

* Fixing methanol 'plant' semantics

* SMR model matching ACS paper

* Docstrings added

* Numbering methanol example

* PR cleanup

* Delete h2i_examples/0X_methanol/run_methanol_out/reports/n2.html

Was unable to delete locally, git tracking issue?

* Delete h2i_examples/0X_methanol/run_methanol_out/reports/inputs.html

Was unable to delete locally, git tracking issue?

* Added back to changelog

* Compactifying smr.py

* Moving smr.py directly to methanol classes

* WIP: reformatting methanol classes

* Shifting methanol values to config

* Updating test values due to pysam change

* Refactored input combining methods into one

* Reworked financial group logic to be smoother when techs have their own financial models

* Renamed elec_production to electricity for consistency

* reinstalled pre-commit

* Changed examples so they're tested correctly

* pysam 7.0 updates

* Changed SMR/methanol as a baseclass setup to be more clean

* Updates for pysam 7

* usgs prospectivity map

* Update pyproject.toml

* Contour map levels

* Added missing file

* Adding geoh2 baseclass based on methanol

* Made combined geoH2 plant

* Added example files

* Working geoh2 model

* Changing arrays to scalars

* Removing methanol

* Make included tech speil

* Updating changelog

* Deleting test_greenheart_system

* Splitting natural and stimulated models

* moving out of deprecated h2i_examples folder

* Deleting unused h2i_examples

* Finance run fixed

* Adding test

* Splitting into natural and stimulated

* Working, still need model docstrings

* Finished docstrings

* Adding doi

* Delete examples/04_geo_h2/run_geo_h2_out/.openmdao_out

* Changes from PR review

* Adding references

* Deleting USGS map

* Docstring fix

* Updated to use the hydrogen_out nomenclature; small docstring updates

* Responding to John's review

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Expand optimization capabilities for HOPP wrapper (#164)

* setting up p2n example in h2i

* hopp only hybrid example working

* protect cacheing, make internal hopp config

* remove hopp-specific adjustments

* add test for hybrid energy plant example

* make changes to get tests passing

* include doc strings for

* include hybrid energy plant example using hopp as only tech

* temporarily point to fork of hopp

* use https link

* temp removal of pip hopp build

* Revert "temp removal of pip hopp build"

This reverts commit c1ba98ee4b733facc7ccc0c5276cf9188b9b050d.

* Revert "use https link"

This reverts commit 00a78b2cbacc84001e0e7c14caec1f7bbbd9376d.

* Revert "temporarily point to fork of hopp"

This reverts commit b49640c88c4f6eed3870e16804d131698811ef47.

* resolve merge conflicts

* include weather files for example 07

* revert changes to iron cost and perf coeffs

* add constraints for hopp opt

* constraints working

* Simplified new HOPP wrapper

* Update for case when desired_schedule is not present in hopp config

* Updated changelog

* Cleaning up unchanged files

* Reverting unnecessary iron changes

* Reverting unnecessary iron changes

* Modifications needed to turn off technologies

* Temporarily pin scipy version until statsmodel is updated

* Responding to review; updating example number

* Updated example path

---------

Co-authored-by: Jared Thomas <jaredthomas68@gmail.com>

* Update ci.yml

* Expanding synloop

* Add WOMBAT electrolyzer O&M model (#168)

* Added initial WOMBAT wrapper for electrolyzer opex

* WIP: comments

* Added wombat library within H2I resource files

* Added WOMBAT test

* WIP: wombat model updates

* Updated wombat model

* Added missing wombat model file

* Added wombat to pyproject

* Removed 3.13 support for now

* Changed how library_path is handled for wombat electrolyzer

* Added WOMBAT doc page

* Updating based on review

* WIP; responding to reviews

* Updates per review

* Updates from review

* making synloop tech_config

* Working synloop

* All synloop costs captured

* Working with feed purge

* Added test and updated changelog

* Fix changelog conflict

* Converter test passing

* Trying to fix HOPP Opex mismatch

* Tests fixed now plz?

* Add DOC (#165)

* initial WIP for DOC

* update inputs

* add cost model

* pass through inputs

* convert to wind wave plant

* fix description

* changelog

* docs

* Added DOC test

* Added optional tests to CI

* Removed pytest ini so package tests are correctly ran

* Made driver_config an input for all technologies

* Fixing merge issues

* Fixing merge issues

* Updating folders based on review

* Correctly computing the LCOC using the H2I finance model

* Added note on variable naming conventions to developer guide

* Updating test example logic

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Open-loop storage control framework (#171)

* establish basic framework for including controllers
* include pass-through controller

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>
Co-authored-by: bayc <christopher.j.bay@gmail.com>

* Deleting and moving files in response to PR review

* Responding to elenya PR comments

* Fixed h2_storage setup

* ProFAST params optional input (#178)

* added option for user to provide profast parameters in finance params

* minor update to handling user provided PF params and changelog

* removed unused import to finance.py

* added test for user provided profast params

* removed unused input for the new finance test

* added documentation for finance parameter specification

* updated finance parameters docs

* added docstring to test

* added check for inconsistent inputs in finance.py

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Rearranging performance model to _in/_consume/_out

* Cleanup for PR

* Resolving JSONDecode error?

* Another JSONDecode Error fix?

* Added constants file

* Updating changelog

* Weather fix?

* Test number fix

* Minor comment cleanup in ammonia synloop

* Remove atb_year, add analysis_start_year (#190)

* added option for user to provide profast parameters in finance params

* minor update to handling user provided PF params and changelog

* removed unused import to finance.py

* added test for user provided profast params

* removed unused input for the new finance test

* added documentation for finance parameter specification

* updated finance parameters docs

* added docstring to test

* added check for inconsistent inputs in finance.py

* changed atb_year to analysis_start_year in yaml files

* changed atb_year to analysis_start_year in test dictionaries in py files

* changed atb_year to analysis_start_year in finance.py in ProFastComp

* changed atb_year + 2 to analysis_start_year in older finance or cost scripts

* changed atb_year + 1 to analysis_start_year in older finance script

* removed unused atb_year input to basic_H2_cost_model and updated  calls to the function

* updated atb_year thing in eco utilities to calc cambium year

* changed atb_year to analysis_start_year in eco finance.py for ptc cost adjustment calcs

* updated accessing capex and opex values in ProFastComp to reduce warnings

* updated comparison of plant parameters and profast parameters in ProFastComp

* replaced atb_year with analysis_start_year in doc files

* updated CHANGELOG.md

* Minor doc updates

* Added test for invalid profast params instantiation

* analysis_start_year -> financial_analysis_start_year

* Fixing HOPP examples

* HOPP example update

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Adding incomplete doc file and changing o2_opex to o2_sales

* Add financial_analysis_start_year to example

* add *_out/ to .gitignore to avoid clutter (#191)

* add *_out/ to .gitignore to avoid clutter

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Financial updates: LCOE calc and grouping logic (#176)

* Financial updates for LCOE

* Expanding financial metric customization and included technologies

* added to docs; updates based on review

* Fixing merge

* Renaming default financial group

* Changing LCOH test for 05 example

* Updated tests after merge

* Reformulated how LCO filtering works

* Updated financial tests

* Formatted yaml block

* Updated PySAM Solar-PV model (#187)

* updated pvwatts solar performance model and made test

* added tilt angle function and added config_name to design config

* added new validator and updated solar_pysam with doc strings and defaults

* added docstring to calc_tilt_angle function

* updated CHANGELOG

* updated solar_pysam to allow for more user-specified parameters

* added option to create new or default pvwatts model

* updated pv input config and workflow and added tests

* added docstrings

* added docs for Pvwattsv8 model

* minor updates to doc file and desc from feedback

* changed Args to Attributes in solar_pysam docstrings

* Minor formatting updates to pysam model

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Simple Air Separation Unit Model (#179)

* added simple ASU performance and cost model

* added simple ASU to supported models

* added doc strings and updated CHANGELOG

* Testing ASU

* resolved merge conflicts in gitignore

* merged ASU cost and performance model into one file

* added driver config as input and added test for cost and performance

* fixed merge conflicts of integrating nitrogen into finance calcs

* updated content in air to be defined as fraction rather than percent

* reverted example test value for example 13 test

* Updating air separator examples

* Updated ASU constants

* Updated test values for LCON

* Updated ASU constants

---------

Co-authored-by: jmartin4 <jonathan.martin@nrel.gov>
Co-authored-by: John Jasa <johnjasa11@gmail.com>

* XDSM fix: only run pyxdsm when connections exist in the model (#201)

* don't try to run pyxdsm if there are no connections in the system

* update changelog

* ATB-Compatible Cost models for PV (#193)

* updated pvwatts solar performance model and made test

* added tilt angle function and added config_name to design config

* added new validator and updated solar_pysam with doc strings and defaults

* added docstring to calc_tilt_angle function

* updated CHANGELOG

* updated solar_pysam to allow for more user-specified parameters

* added option to create new or default pvwatts model

* updated pv input config and workflow and added tests

* added docstrings

* added docs for Pvwattsv8 model

* added ATB-compatible cost models for PV

* added doc page for PV cost models

* added docstrings to PV cost model configs

* updated CHANGELOG

* Minor doc updates

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>
Co-authored-by: kbrunik <kbrunik@gmail.com>

* small changes

* Connected electrolyzer capacity to cost models (#194)

* made electrolyzer capacity an input to basic and singlitico cost models

* updated electrolyzer input from MW to number of clusters

* updated driver and tech config for example 5

* updated test for example 5

* updated tech config for electrolyzer n_clusters input for 1, 2, and 8

* updated electrolyzer size inputs in example 12 tech config

* updated wombat model and tests and example for new electrolyzer input file format

* updated CHANGELOG.md

* updated doc files for changes to electrolyzer capacity setting

* updated example 5 starting electrolyzer capacity to 500 MW

* update example 5 test and added input files to run without optimization

* fixed failing test in example 5 test

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* H2 dispatch (rule based control) (#195)



* add PyXDSM output to .gitignore

* rename control_methods to control_strategies
* add rule-based pass-through dispatch controller for storage technologies to follow a demand profile
---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>
Co-authored-by: bayc <christopher.j.bay@gmail.com>
Co-authored-by: Genevieve Starke <genevieve.starke@nrel.gov>

* Pinning CoolProp to <7.0 (#209)

* Rolling back coolprop version

* Reverting permissions changes

* Dispatch patch (#208)

* revert accidental changes

* add missing back-tick

* Copy and move backup iron files when refitting

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Updating electrolyzer to use n_clusters

* Minor finance parameter re-org and renaming (#196)

* moved some input parameters from plant to finance parameters and renamed some other finance parameters

* updated finance related docs

* updated changelog

* Updated ASU example

* Actually updated ASU model

* Updated ASU example

* renamed output_dollar_year to target_dollar_year in AdjustCapexOpexComp

* changed inflation rate naming convention

* updated example 14 and minor clean-up to example 13

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Adding plant config back to try to resolve conflict

* Updating plant_configs

* Fix to co2h plant_config

* Hotfix for mcm update (#213)

* Delete examples/03_methanol/smr/tech_inputs/floris_input_lbw_6MW.yaml

* Delete examples/03_methanol/co2_hydrogenation/tech_inputs/floris_input_lbw_6MW.yaml

* Changed units of h2_in for co2 methanol

* Unpinning packages (#217)

* Unpinning scipy

* Updating example comparison value; removed coolprop pin

* Putting CoolProp pin back

* Updating docstrings in methanol_baseclass

* Adding journal pub to docs

* Cost year moved from plant_config to cost model outputs (#199)

* added cost_year to converter cost model configs and updated discount_year init in AdjustedCapexOpexComp

* reformatted example 1 and example 2 input files and updated steel cost config

* updated remaining example tech and plant configs

* updated ASU tests and cost config and example 13 configs

* updated test inputs for simple ammonia model and ro desal

* updated docstrings for cost model configs that have docstrings and were modified

* updated finance doc page and CHANGELOG

* added cost model base class

* updated solar-PV model to use cost base class

* updated electrolyzer cost models

* updated ASU cost model

* updated cost model for hydro plant

* updated wind plant cost model

* updated desal cost model

* updated ammonia cost models

* updated steel cost models

* updated h2 storage cost model

* updated DOC cost model

* updated methanol cost model

* updated hydrogen tank storage cost model

* updated wombat cost model and tests

* updated geoh2 cost models

* added summary of cost year stuff and cost models to finance parameter doc

* updated some example files

* connected cost year to AdjustedCapexOpexComp

* added cost year output to hopp wrapper

* removed discount year dict from AdjustedCapexOpexComp

* updated steel cost config

* updated example input files to ensure they run

* one minor update to specifying_finance_parameters.md

* updated ro desal test input and baseclass

* updated ammonia test values

* updated ammonia test values and example 9 tech config

* updated doc page for adding a new technology

* updated ammonia synloop value agian

* updated DOC cost model baseclass

* updated docs and docstrings

* removed unnecessary comments in wombat and desal

* updated hopp, geoh2, methanol, and h2 storage cost models to inherit baseclass

* made cost base config and have cost year set in setup() method and updated all cost models

* updated adding a new tech doc page

* updated tests

* properly fixed tests

* updated co2 methanol cost model

* Refactoring where cost model config lives

* Made h2 compressor tests approx

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Ocean Alkalinity Enhancement Model (#212)

* initial WIP for DOC

* update inputs

* add cost model

* pass through inputs

* convert to wind wave plant

* fix description

* changelog

* docs

* Added DOC test

* Added optional tests to CI

* Removed pytest ini so package tests are correctly ran

* Made driver_config an input for all technologies

* Fixing merge issues

* Fixing merge issues

* Updating folders based on review

* Correctly computing the LCOC using the H2I finance model

* Added note on variable naming conventions to developer guide

* Updating test example logic

* wip

* fix doc loading in connecting tech

* working performance model

* rename example folder

* cost model integrated

* remove accidental commits

* move folder

* remove energy from cost model

* Added OAE tests

* example reorg

* add financial model

* update test

* oae financial model

* update financials

* add docs

* Minor doc updates

* add weather file

* update tests

* update for cost model PR #199

* update docs

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Option to export ProFAST object to yaml file (#207)

* added ability to export profast object to dictionary in finances.py

* updated CHANGELOG

* input driver_config in test_finances.py

* Added utilities test

* removed check for writing pf file if running optimization and updated docstring in profast reverse tools

* Moved where the save profast option is set and added it to an example

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* ProFastComp refactor (#218)

* updated profast tools added dict_utils and added validator

* added function to ensure readable formatting of dictionaries if exporting to yaml

* added draft of new financial config and workflow

* minor docstring updates to profast financial config

* finalized restructuring of ProFastComp

* fixed pyxdsm import in h2integrate_model

* updated example input files and test_finances

* added docstrings to dict_utils and added inline comments to ProFastComp

* removed unused or duplicated functions from profast_tools

* updated example 1 input file and began drafting updates for different outputs

* updated profast_financial for all parameters specified under params

* updated profast_financial to allow for different outputs

* added profast export to profast_financial

* updated example input files

* updated steel finance config

* updated profast financial and added test for financials

* removed unused policy_parameters section from plant_config

* cleanups to test_finances

* removed added dict to supported_models

* updated discount rate tech config and papermill finance model

* updated docs and docstrings in profast financial

* added docs and made time until replacement input include tech name and removed old profast model

* added function for checking parameters

* updated h2integrate_model to be flexible for different finance models

* removed commented out lines in example 1 plant config

* updated jupyter notebooks and markdown files for new finance component naming

* reran jupyter notebooks

* updated CHANGELOG

* Updating PR template and docs (#215)

* updating PR template and docs

* added technology overview draft doc page

* incorporate review comments

* update technology_overview

* examples documentation

---------

Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com>
Co-authored-by: kbrunik <kbrunik@gmail.com>

* Connect variables between technologies with different variable names (#236)

* added option to specify different variable names in length 3 technology interconnections

* udpated changelog

* updated steel model to take electricity cost as possible input

* Added run to test

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Bugfix: multiple electricity producing techs and power combiner (#232)

* fixed power combiner and added example

* fixed line in h2integrate_model that causes error if multiple electricity producing techs

* added test for new example

* removed unused line of code from power_combiner

* updated CHANGELOG

* updated variable names in test_power_combiner

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Time info in `plant_config` (#219)

* added simulation time info to plant schema

* replaced n_timesteps in wind and solar baseclasses and hydroplant

* updated solar pv tests

* moved simulation into into subsection of plant

* updated how solar wind and hydro plants access n_timesteps

* updated plant config input for solar tests

* updated description in schema and added function to generate a time profile

* pre-commit fix from merge

* Converting many more models to use the plant_config n_timesteps input

* removed make_time_profile function

* updated CHANGELOG

* added errors if dt or n_timesteps is changed from what is supported

* added test for unsupported simulation inputs

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Add an electricity splitter (#188)

* WIP: adding electricity splitter

* Made splitter require only one config option, simplified example, updated tests

* Adding clarity for how the split happens

* Added connecting technologies doc page

* renamed example system

* Renamed example

* Added explicit test for varied prescribed_electricity

* Updated example 12

* Added validator for the split_mode

* Removed pinned timezonefinder

* Adding missing weather data files

* Updates based on PR feedback

* Renamed power combiner to electricity combiner

* Updating tests after merge

* Updated docs

* Fixed combiner example

* Fixed combiner example

* Custom Electrolyzer Cost Model (#227)

* added simple custom cost model for electrolyzer

* added docstrings and updated CHANGELOG

* added cost model to doc page

* Added custom elec cost model test

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Making pipe and cable substance-agnostic (#241)

* Making pipe and cable substance-agnostic

* Missed one line added to h2integrate_model.py

* Changelog update

* Added pipe test

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Add natural gas plants and expand feedstock capabilities (#221)

* Added initial version of NG plant

* Adding actual models for NG

* Fixed BTU to cu ft conversion

* Added natural gas doc

* Refining names

* Refactoring NG workflow, esp. for pricing

* Updated example test values for NG

* added feedstock cost model and tests and updated costmodelbaseclass

* Removing prior notion of resource for NG

* New feedstocks working as intended

* Updated test values for the natural gas example

* Added feedstocks doc page

* Updating feedstock test file

* Updating tests due to develop

* Updated examples

* fix tests

* update plant config

* added default cost values in feedstockcostconfig

* updated feedstock doc page

* updated ng to handle varying dt

* unit conversion

* Fixing dt logic in NG performance model

* Making pipe work for NG as well

---------

Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com>
Co-authored-by: kbrunik <kbrunik@gmail.com>

* Add Financial Subgroups Concept (#240)

* attempt at subgroups

* updated create_financial_model for new subgroup setup

* updated profast financial to take in description

* updated connect_technologies and example 1 and create_financial_model

* added other outputs to ProFastComp and updated example 1 test variable names

* updated docstring for ProFastComp outputs

* moved commodity type from tech config keys to method and added commodity_units to supported models

* updated logic for technology specific finance models

* fixed circular import error and removed commodity units from supported models

* created finance folder and updated imports

* updated finance group connection logic for commodities in connect_technologies

* updated example 2 input files

* name commodity not commmodity_type

* updated example 4 plant config

* change commodity_type to commodity

* updated example 6 input file

* updated example 8 input files

* updated example 10 input file

* name commodity not commmodity_type

* updated example 4 plant config

* updated example 6 input file

* updated example 8 input files

* updated example 10 input file

* typo fix in example 10 python filename

* update subgroup default naming

* remove unused file

* update examples

* update test_all_examples

* added functionality to enable multiple finance models per subgroup

* updated example 12 and example tests for even numbered examples

* updated handling description in ProFastComp

* updated ProFastComp output things and wrapped up even examples

* remove unused import

* update docstring

* update ng example

* added new doc files for finance

* fixed failing tests

* updated example input files 1-3 and has co2h methanol example test working

* LCOE requires all tech

* removed unused infor from example plant_configs

* deleted commented out lines in example 11 plant config

* tried to add more description to finance docs

* Nitpicky doc changes

* Minor doc and logic cleanup for finance models

* include description in financial outputs

* removed legacy finance groups from example tech configs

* added comments and removed commented out code in h2integrate_model and profast_financial

* updated finance_index.md note

* change from nickname to name

* add error if invalid tech provided in subgroup

* subgroups

* remove old logic

* added error if default_finance_model_name is included in the finance parameters

* fix refs and a few minor other things

* update examples with new logic

* clarify finance groups

* fix example test

* update example tests and collect_custom_models

* update tests

* update specifying finance parameters md

* update docs

* update examples and tests based on correct techs for subgroups

* respond to PR comments

* changelog

* add text to subgroups explaination

* Minor docs updates

* Removed notion of `time_zone` for now

---------

Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com>
Co-authored-by: John Jasa <johnjasa11@gmail.com>
Co-authored-by: Jared Thomas <jaredthomas68@gmail.com>

* Added generic storage model (#248)

* Added simple generic storage model

* Merging

* Updated battery cost model and example

* Added simple generic storage model docs

* Added test for example

* Finishing touches

* remove unused cherry-picked file

* remove unused cherry-pick test yaml

* minor details in example

* test generic storage model against H2 storage model

* remove super

* Added more exact example test values

* Updated tests!

---------

Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com>
Co-authored-by: kbrunik <kbrunik@gmail.com>

* Fix formatting after recent changes (#249)

* added demand into NG plant

* updated natural gas plant model to accept an input demand

* updated natural gas example, tests and model

* updated input capacity name for natural gas performance model to be same as cost model

* removed combiner from natural gas example

* added inputs for test_natural_gas_models.py

* added test for natural gas model

* small things

* finished updating naming for natural gas plant capacity

* Wind Resource API Downloads (#245)

* added wip version of resource handling files

* wip worked on developing wind downloads

* updated river resource

* updated wind resource base and nrel wtk api resource

* updated solar resource base and nrel goes api resource

* added goes and wtk to supported models

* updated example 5 and wind plant performance model handling of resource

* updated goes solar api resource model

* updated examples 5,8,10,14,15 input files and changed windplant to use same hardcoded hubheight

* updated windplants to use actual hub-height

* added download tools and time tools

* minor bugfix in resource_base for when user inputs a file and folder

* updated solar resource data files

* updated solar resource in pv models and example 15

* fixed bug in pysam solar plant that occurred with rolled resource data

* removed model.post_process from examples and tests with resource data

* removed solar resource handling

* reverted changes to solar performance models

* updated solar resource inputs in example 15 plant config

* added doc strings to resource utilities

* added docstrings and comments to new resource classes and configs

* updated example 6 and 15 input files so simulation doesnt fail

* added wind resource files for flatirons site downloaded from wtk v2

* updated test values for tests that use wind plant

* added test for test resource file tools and updated check_resource_dir to always output absolute paths

* added tests and updated make_time_profile

* made tests for time_tools

* made tests for time_tools

* added test for wind resource component

* added test __init__ file

* added check in check_resource_dir to see if running Github actions

* unset RESOURCE_DIR environment variable to prevent unexpected API calls

* updated initialization of SiteInfo with solar as False

* updated and added pytest session start and end configs to not cause issues for users that specify resource_dir environment variable

* updates to resource scripts

* update to time_tools

* updated doc jupyter notebook to run properly

* removed use of time_tools

* minor updates to comments or removed commented out code

* added default value for timezone to be zero

* updated lco test values for example 5 and example 10

* removed commented out code from file_tools

* added docstrings and inline comments to wind performance models

* cleaned up example input files that use wind

* added doc page for setting environment variables

* minor update to output data naming

* added doc pages for wind resource

* Updates to resource docs, bump OM min version, restore post_processing after filtering out resource data

* minor cleanups

* undid changes to post_process function in h2integrate_model

* Trying different valid_intervals definition

* added inline comments to format_resource_data function in wind performance models

* Minor review feedback

* Updated readme and config

* added init file to resource folder

* Removed old readme portion

* updated import path in conftest

* updated conftest in tests/ to have same protection for user defined environment variables

* Doc updates

* updates based on reviewer feedback

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Added variable o&m (#235)

* added variable into cost and finance models

* added plant life input to cost model tests that were missing it

* added varom output to wombat model

* updated CostModelBaseClass doc string

* updated changelog

* added initial test for variable om in profast and updated profast script

* updated added finance tests

* updated units in new finance tests

* added plant life to test plant configs

* updated feedstock cost model and natgas test

* fixed failing tests in feedstock and custom elec cost

* updated variable om tests in test_finance.py

* renamed attr_filter

* Using create_years_of_operation in tests

* Naming fix

* Fixing order of args

* Mods due to review feedback

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Update NG firming branch (#259)

* Wind Resource API Downloads (#245)

* added wip version of resource handling files

* wip worked on developing wind downloads

* updated river resource

* updated wind resource base and nrel wtk api resource

* updated solar resource base and nrel goes api resource

* added goes and wtk to supported models

* updated example 5 and wind plant performance model handling of resource

* updated goes solar api resource model

* updated examples 5,8,10,14,15 input files and changed windplant to use same hardcoded hubheight

* updated windplants to use actual hub-height

* added download tools and time tools

* minor bugfix in resource_base for when user inputs a file and folder

* updated solar resource data files

* updated solar resource in pv models and example 15

* fixed bug in pysam solar plant that occurred with rolled resource data

* removed model.post_process from examples and tests with resource data

* removed solar resource handling

* reverted changes to solar performance models

* updated solar resource inputs in example 15 plant config

* added doc strings to resource utilities

* added docstrings and comments to new resource classes and configs

* updated example 6 and 15 input files so simulation doesnt fail

* added wind resource files for flatirons site downloaded from wtk v2

* updated test values for tests that use wind plant

* added test for test resource file tools and updated check_resource_dir to always output absolute paths

* added tests and updated make_time_profile

* made tests for time_tools

* made tests for time_tools

* added test for wind resource component

* added test __init__ file

* added check in check_resource_dir to see if running Github actions

* unset RESOURCE_DIR environment variable to prevent unexpected API calls

* updated initialization of SiteInfo with solar as False

* updated and added pytest session start and end configs to not cause issues for users that specify resource_dir environment variable

* updates to resource scripts

* update to time_tools

* updated doc jupyter notebook to run properly

* removed use of time_tools

* minor updates to comments or removed commented out code

* added default value for timezone to be zero

* updated lco test values for example 5 and example 10

* removed commented out code from file_tools

* added docstrings and inline comments to wind performance models

* cleaned up example input files that use wind

* added doc page for setting environment variables

* minor update to output data naming

* added doc pages for wind resource

* Updates to resource docs, bump OM min version, restore post_processing after filtering out resource data

* minor cleanups

* undid changes to post_process function in h2integrate_model

* Trying different valid_intervals definition

* added inline comments to format_resource_data function in wind performance models

* Minor review feedback

* Updated readme and config

* added init file to resource folder

* Removed old readme portion

* updated import path in conftest

* updated conftest in tests/ to have same protection for user defined environment variables

* Doc updates

* updates based on reviewer feedback

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Added variable o&m (#235)

* added variable into cost and finance models

* added plant life input to cost model tests that were missing it

* added varom output to wombat model

* updated CostModelBaseClass doc string

* updated changelog

* added initial test for variable om in profast and updated profast script

* updated added finance tests

* updated units in new finance tests

* added plant life to test plant configs

* updated feedstock cost model and natgas test

* fixed failing tests in feedstock and custom elec cost

* updated variable om tests in test_finance.py

* renamed attr_filter

* Using create_years_of_operation in tests

* Naming fix

* Fixing order of args

* Mods due to review feedback

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

---------

Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com>

* added draft version of NPV financial calc

* npv financials

* finish cherry-pick

* reorganize dir

* update commodity

* docstrings

* example with NPV

* fixed cost breakdown column renaming

* minor cleanup to example 16 plant config

* add var om

* added generic load demand component

* minor update to loaddemand model

* NG: Commodity-neutral transporters and basic operations (#256)

* added generic combiner, splitter and summer models

* updated combiner and splitter to power_combiner and power_splitter

* added tests for generic splitter and combiner

* removed electricity combiner and spliter from supported models

* removed electricity combiner and electricity splitter

* updated invalid mode splitter test

* Minor typo fexes

* Updated CI to run on ng_firming branch

* Update example

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* NG: Fix Example 16 Tests (#263)

* fix natural gas example and test

* updated ng test values

* added example test for added feature

* cleaned up plant config

* update integration test

* add npv integration test

* Minor changes for streamlining

* renaming

* Moved commodity sell price to an input

* update example file

* remove unused code

* add more comments

* added profast npv finance model and reorganized profast_financial

* added atb wind cost model

* added wind atb cost model to supported models

* Bugfix: API Calls (#267)

* added bugfix into API with .env variable setting method

* fixed checking if None to instead check string length

* update docstrings

* update docs

* NG: Add grid converter (#262)

* Adding first grid notion

* Added grid case example

* Added grid as feedstock

* Added grid selling to the example

* added coproduct to profast_financial

* Fixed coproduct logic

* added test for example 21

* addressing minor PR feedback

---------

Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com>
Co-authored-by: kbrunik <kbrunik@gmail.com>

* NG: PySAM Wind Plant and Basic Turbine Layout (#261)

* added intermediate wind plant refactor with new validator

* merged gitignore

* updated wind plant and added layout method

* updated compute method of wind plant pysam

* added test for wind plant performance

* bugfix in layout and added layout tests

* minor additions to docstrings

* added example using pysam wind and added tests

* updated keyname in pysam wind test

* updated example 26 to use wind ATB cost model

* Minor syntax changes

* added layout test and added inputs for pysam powercurve recalc function

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>
Co-authored-by: kbrunik <kbrunik@gmail.com>

* removed old code in profast npv

* NG: Flexible Finance Streams (#270)

* wip commodity streams

* minor update, wip

* updated example 22 to use commodity stream and updated test

* added another example based on example 16 to show commodity stream usage

* fixed bug causing test failures

* added documentation of commodity_stream

* precommit

---------

Co-authored-by: kbrunik <kbrunik@gmail.com>
Co-authored-by: John Jasa <johnjasa11@gmail.com>

* added ProFAST NPV to supported models and put in example 26 and tests

* gitignore wind resource file downloads (#273)

* put wind and solar resource file folder in gitignore

* removed solar resource files from gitignore

* updated npv calc inputs

* loosen tolerance

* Revert "Merge branch 'ng_firming' into develop" (#276)

This reverts commit 1190f3f1a41059d3325f90cc94cae8be5e1dc605, reversing
changes made to cb71b9c47ffed3ae434e72d2cf8ffa42c0f51ce9.

* Bump version to 0.4.0 (#285)

* Updating changelog for 0.4.0

* Fixed changelog formatting

* Updating develop after main merge (#287)

* Framework overhaul (#125)

* Renamed a few files from greenheart to h2integrate (#120)

* Renamed a few files from greenheart to h2integrate

* removed openmdao all install

* Updated pysam7 test values

* Fixing iron data save separation (#122)

* Fixing iron data save separation

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Minor bug-fix to H2_Results and added optional inputs to electrolyzer (#117)

* added ability to initialize electrolyzer curve coefficients

* added test for initializing electrolyzer with curve coeff

* added optional input of water usage rate to electrolyzer

* updated run_h2_PEM to fix outputs if some stacks are never turned on

* updated creation of pem_param_dict in electrolysis.py for new inputs

* updated CHANGELOG

* updated test values in test_greenheart_system that were impacted from pysam update

* minor bug-fix in run_h2_PEM

* updated from reviewer feedback

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Update to new framework (#123)

* Added initial reference plant design for H2I

* Resolving pre-commit issues

* Added missing example

* Fixed example case imports

* Added initial ammonia ref design

* Updated ammonia example; added config to H2 storage

* Made hydrogen storage a passthrough object

* Updating for H2I migration

* Added test examples for H2I

* Changed examples so they're tested correctly

* Updates for pysam 7

* Update pyproject.toml

* WIP: removing prior framework

* WIP: cleaning out existing framework

* WIP: removing unused files

* All tests pass

* Expand H2I docs basics (#119)

* WIP: reworking docs

* WIP: expanding getting started docs

* WIP: more docs additions

* Additional docs cleanup

* Freshly built docs

* higher res splash image

* Added to changelog and ruamel yaml

* Removed all on openmdao install

* Updates based on review feedback

* updated readme and pr template

* Updating autodocs

* Testing example values

* Updated test values

* Updates due to HOPP version

* Added capability for multiple commodity_types in the same financial group

* Updates for ref design cases

* Bumping version

* Updated changelog

---------

Co-authored-by: Jonathan Martin <94018654+jmartin4nrel@users.noreply.github.com>
Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com>

* add a read the docs config file (#140)

* Update and rename .readthedocs.yml to .readthedocs.yaml

---------

Co-authored-by: Jonathan Martin <94018654+jmartin4nrel@users.noreply.github.com>
Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com>
Co-authored-by: Rob Hammond <13874373+RHammond2@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: elenya-grant <116225007+elenya-grant@users.noreply.github.com>
Co-authored-by: kbrunik <kbrunik@gmail.com>
Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com>
Co-authored-by: Rob Hammond <13874373+RHammond2@users.noreply.github.com>
Co-authored-by: bayc <christopher.j.bay@gmail.com>
Co-authored-by: Jared Thomas <jaredthomas68@gmail.com>
Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com>
Co-authored-by: Genevieve Starke <genevieve.starke@nrel.gov>
@johnjasa johnjasa mentioned this pull request Oct 2, 2025
33 tasks
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.

2 participants