Skip to content

Demonstrating different sizing modes with H2 electrolyzer#198

Merged
johnjasa merged 100 commits intoNatLabRockies:developfrom
jmartin4u:nh3-merge
Dec 16, 2025
Merged

Demonstrating different sizing modes with H2 electrolyzer#198
johnjasa merged 100 commits intoNatLabRockies:developfrom
jmartin4u:nh3-merge

Conversation

@jmartin4u
Copy link
Copy Markdown
Collaborator

@jmartin4u jmartin4u commented Aug 4, 2025

Utilizing Sizing Modes with Resizeable Converters

When the size of one converter is changed, it may be desirable to have other converters in the plant resized to match.
This can be done manually by setting the sizes of each converter in the tech_config, but it can also be done automatically with resizeable converters.
Resizeable converters can execute their own built-in sizing methods based on how much of a feedstock can be produced upstream, or how much of a commodity can be offtaken downstream by other converters.
By connecting the capacities of converters to other converters, one can build a logical re-sizing scheme for a multi-technology plant that will resize all converters by changing just one config parameter.

Setting up a resizeable converter

To set up a resizeable converter, take advantage of the ResizeablePerformanceModelBaseConfig and ResizeablePerformanceModelBaseClass.
The ResizeablePerformanceModelBaseConfig will declare a sizing performance parameter within the the tech_config, which is a dict that specifies the sizing mode.
The ResizeablePerformanceModelBaseClass will automatically parse this dict into the inputs and discrete_inputs that the performance model will need for resizing.
Here is the start of an example tech_config for such a converter:

tech_config = {
    "model_inputs": {
        "shared_parameters": {
            "production_capacity": 1000.0,
        },
        "performance_parameters": {
            "sizing": {
                "size_mode": "normal",  # Always required
                "flow_used_for_sizing": "electricity",  # Not required in "normal" mode
                "max_feedstock_ratio": 1.6,  # Only used in "resize_by_max_feedstock"
                "max_commodity_ratio": 0.7,  # Only used in "resize_by_max_commodity"
            },
        },
    }
}

Currently, there are three different modes defined for size_mode:

  • normal: In this mode, converters function as they always have previously:
    • The size of the asset is fixed within compute().
  • resize_by_max_feedstock: In this mode, the size of the converter is adjusted to be able to utilize all of the available feedstock:
    • The size of the asset should be calculated within compute() as a function of the maximum value of <feedstock>_in - with the <feedstock> specified by the flow_used_for_sizing parameter.
    • This function will utilizes the "max_feedstock_ratio" parameter - e.g., if "max_feedstock_ratio" is 1.6, the converter will be resized so that its input capacity is 1.6 times the max of <feedstock>_in.
    • The set_val method will over-write any previous sizing varaibles to reflect the adjusted size of the converter.
  • resize_by_max_commodity: In this mode, the size of the asset is adjusted to be able to supply its product to the full capacity of another downstream converter:
    • The size of the asset should be calculated within compute() as a function of the max_<commodity>_capacity input - with the <feedstock> specified by the resize by flow parameter.
    • This function will utilizes the "max_commodity_ratio" parameter - e.g., if "max_commodity_ratio" is 0.7, the converter will be resized so that its output capacity is 0.7 times a connected "max_<commodity>_capacity" input.
    • The set_val method will over-write any previous sizing varaibles to reflect the adjusted size of the converter.

To construct a resizeable converter from an existing converter, very few changes must be made, and only to the performance model.
ResizeablePerformanceModelBaseConfig can replace BaseConfig and ResizeablePerformanceModelBaseClass can replace om.ExplicitComponent.
The setup function must be modified to include any "max_<feedstock>_capacity" outputs or "max_<commodity>_capacity" inputs that can be connected to do the resizing.
Then, any feedstock_sizing_function or feedstock_sizing_function that the converter needs to resize itself should be defined, if not already.
Finally, the compute method should be modified (near the start, before any size-based calculations occur) to modify the size with these functions:

import numpy as np
from h2integrate.core.utilities import ResizeablePerformanceModelBaseConfig, merge_shared_inputs
from h2integrate.core.model_baseclasses import ResizeablePerformanceModelBaseClass


class TechPerformanceModelConfig(ResizeablePerformanceModelBaseConfig):
    # Declare tech-specific config parameters
    size: float = 1.0


class TechPerformanceModel(ResizeablePerformanceModelBaseClass):
    def setup(self):
        self.config = TechPerformanceModelConfig.from_dict(
            merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance"),
            strict=False,
        )
        super().setup()

        # Declare tech-specific inputs and outputs
        self.add_input("size", val=self.config.size, units="unitless")
        # Declare any commodities produced that need to be connected to downstream converters
        # if this converter is in `resize_by_max_commodity` mode
        self.add_input("max_<commodity>_capacity", val=1000.0, units="kg/h")
        # Any feedstocks consumed that need to be connected to upstream converters
        # if those converters are in `resize_by_max_commodity` mode
        self.add_output("max_<feedstock>_capacity", val=1000.0, units="kg/h")

    def feedstock_sizing_function(max_feedstock):
        max_feedstock * 0.1231289  # random number for example

    def commodity_sizing_function(max_commodity):
        max_commodity * 0.4651  # random number for example

    def compute(self, inputs, outputs, discrete_inputs, discrete_outputs):
        size_mode = discrete_inputs["size_mode"]

        # Make changes to computation based on sizing_mode:
        if size_mode != "normal":
            size = inputs["size"]
            if size_mode == "resize_by_max_feedstock":
                if inputs["flow_used_for_sizing"] == "<feedstock>":
                    feed_ratio = inputs["max_feedstock_ratio"]
                    size_for_max_feed = self.feedstock_sizing_function(
                        np.max(inputs["<feedstock>_in"])
                    )
                    size = size_for_max_feed * feed_ratio
            elif size_mode == "resize_by_max_commodity":
                if inputs["flow_used_for_sizing"] == "<commodity>":
                    comm_ratio = inputs["max_commodity_ratio"]
                    size_for_max_comm = self.commodity_sizing_function(
                        np.max(inputs["max_<commodity>_capacity"])
                    )
                    size = size_for_max_comm * comm_ratio
            self.set_val("size", size)

Example plant setup

An example plant with resizeable technologies is set up in examples/22_sizing_modes/.
Follow the examples in run_size_modes.ipynb to see how they work.
Here, there are three technologies in the the tech_config.yaml:

  1. A hopp plant producing electricity,
  2. An electrolyzer producing hydrogen from that electricity, and
  3. An ammonia plant producting ammonia from that hydrogen.

The electrolyzer and ammonia technologies are resizeable.
They are set up in "normal" mode in the tech_config.

technologies:
  hopp:
    model_inputs:
      performance_parameters:
        sizing:
          size_mode: "normal"
  electrolyzer:
    model_inputs:
      performance_parameters:
        sizing:
          size_mode: "normal"
  ammonia:
    model_inputs:
      performance_parameters:
        sizing:
          size_mode: "normal"

The technology_interconnections in the plant_config is set up to send electricity from the wind plant to the electrolyzer, then hydrogen from the electrolyzer to the ammonia plant.
There is also an entry to send the max_hydrogen_capacity from the ammonia plant to the electrolyzer, which will be required only in the resize_by_max_commodity mode.
Note: this creates a feedback loop within the OpenMDAO problem, which requires an iterative solver.

technology_interconnections: [
    ['hopp', 'electrolyzer', 'electricity', 'cable']
    ['electrolyzer', 'ammonia', 'hydrogen', 'pipe']
    ['ammonia', 'electrolyzer', 'max_hydrogen_capacity']
]

resize_by_max_feedstock mode

In this case, the electrolyzer will be sized to match the maximum electricity_in coming from HOPP.
This increases the electrolyzer size to 1080 MW, the closest multiple of 40 MW (the cluster size) matching the max HOPP power output of 1048 MW.

technologies:
  hopp:
    model_inputs:
      performance_parameters:
        sizing:
          size_mode: "normal"
  electrolyzer:
    model_inputs:
      performance_parameters:
        sizing:
          size_mode: "size_by_max_feedstock"
          flow_used_for_sizing: "electricity"
          max_feedstock_ratio: 1.0
  ammonia:
    model_inputs:
      performance_parameters:
        sizing:
          size_mode: "normal"

resize_by_max_product mode

In this case, the electrolyzer will be sized to match the maximum hydrogen capacity of the ammonia plant.
This requires the technology_interconnections entry to send the max_hydrogen_capacity from the ammonia plant to the electrolyzer.
This decreases the electrolyzer size to 560 MW, the closest multiple of 40 MW (the cluster size) that will ensure an h2 produciton capacity that matches the ammonia plant's h2 intake at its max ammonia produciton capacity.

technologies:
  hopp:
    model_inputs:
      performance_parameters:
        sizing:
          size_mode: "normal"
  electrolyzer:
    model_inputs:
      performance_parameters:
        sizing:
          size_mode: "size_by_max_commodity"
          flow_used_for_sizing: "hydrogen"
          max_commodity_ratio: 1.0
  ammonia:
    model_inputs:
      performance_parameters:
        sizing:
          size_mode: "normal"

Using optimizer with multiple connections

With both electrolyzer and ammonia in size_by_max_feedstock mode, the COBYLA optimizer can co-optimize their max_feedstock_ratio variables to minimize the LCOA. This is achieved at a capacity factor of approximately 55% in both the electrolyzer and the ammonia plant.

In the tech_config:

technologies:
  hopp:
    model_inputs:
      performance_parameters:
        sizing:
          size_mode: "normal"
  electrolyzer:
    model_inputs:
      performance_parameters:
        sizing:
          size_mode: "size_by_max_feedstock"
          flow_used_for_sizing: "electricity"
          max_feedstock_ratio: 1.0
  ammonia:
    model_inputs:
      performance_parameters:
        sizing:
          size_mode: "size_by_max_feedstock"
          flow_used_for_sizing: "hydrogen"
          max_feedstock_ratio: 1.0

And in the driver_config:

driver:
  optimization:
    flag: True
    solver: COBYLA
    tol: 0.01
    catol: 15000
    max_iter: 100
    rhobeg: 0.1
    debug_print: True

design_variables:
  electrolyzer:
    max_feedstock_ratio:
      flag: True
      lower: 0.1
      upper: 10.
      units: unitless
  ammonia:
    max_feedstock_ratio:
      flag: True
      lower: 0.1
      upper: 10.
      units: unitless

objective:
  name: finance_subgroup_nh3.LCOA

End output from COBYLA:

Driver debug print for iter coord: rank0:ScipyOptimize_COBYLA|15
----------------------------------------------------------------
Design Vars
{'ammonia.max_feedstock_ratio': array([1.00961083]),
 'electrolyzer.max_feedstock_ratio': array([0.79723742])}

Nonlinear constraints
None

Linear constraints
None

Objectives
{'finance_subgroup_nh3.LCOA': array([1.19535981])}

Optimization Complete
-----------------------------------

Type of Contribution

  • Feature Enhancement
    • New Technology Model
  • Bug Fix
  • Documentation Update
  • CI Changes
  • Other (please describe):

General 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 (if applicable)
  • Tests pass (If not, and this is expected, please elaborate in the tests section)
  • Added tests for new functionality or bug fixes
  • PR description thoroughly describes the new feature, bug fix, etc.

Related issues

#183

Impacted areas of the software

Key changes:

  • examples/24_sizing_modes/: This is an example folder containing a notebook run_size_modes.ipynb that runs through all the different modes
    • This notebook has also been connected as a docs page in the `_toc.yml'
  • h2integrate/core/h2integrate_model.py: Added check for loops and assignment of linear/nonlinear solvers
  • h2integrate/core/utilities.py: Added the ResizeablePerformanceModelBaseConfig class
  • h2integrate/core/model_baseclasses.py: Added the ResizeablePerformanceModelBaseClass class
  • h2integrate/converters/hydrogen/electrolyzer_baseclass.py: Updated to use the 3 sizing modes
  • h2integrate/converters/hydrogen/eco_tools_pem_electrolyzer.py: Updated to use the 3 sizing modes

Necessary changes made elsewhere:

  • h2integrate/converters/hydrogen/wombat_model.py: Updated to have discrete_inputs and discrete_outputs in super().compute()
  • `h2integrate/converters/hydrogen/test/': Added tests for electrolyzer size modes
  • h2integrate/converters/ammonia/ammonia_synloop.py: Updated to use the first 2 sizing modes
  • `h2integrate/converters/ammonia/test/': Added test for ammonia size modes
  • All examples using the eco_tools_pem_electrolyzer and ammonia_synloop: Updated performance parameters to have size_mode: "normal" (No effect on performance)
  • Changed some default values from 0 to -1 to prevent linear algebra errors when iterative solver is active:
    • h2integrate/storage/hydrogen/pem_electrolyzer.py
    • h2integrate/transporters/cable.py
    • h2integrate/transporters/pipe.py
    • h2integrate/finances/profast_base.py
      • Previously, there was a check for capacity being equal to 0.0 that was used to unsure that total production was connected, so a require_connection = True was added in its place
      • As a result, corrective changes were made to tests that did not connect total production:
        • `h2integrate/finances/test/test_finances.py
        • `h2integrate/finances/test/test_profast_finance.py
        • `h2integrate/finances/test/test_profast_npv.py

Additional supporting information

Test results, if applicable

Tests passing

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Copy Markdown
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.

Overall, I really like this PR. The amount of effort and planning you put into this is palpable, thank you @jmartin4nrel! I generally like the approach you've suggested here and would support it in H2I. I have some pretty in-the-weeds questions or suggestions, but nothing roadblocking at all.

Understanding the different implementations of sizing technologies is a potentially difficult task for users, so I want to take special consideration for the naming scheme. I have a few questions here that I'd love your take on:

  • My biggest question or point I want to discuss is the naming introduced here, specifically on compute_mode, normal, feedstock_size, and product_size. Because these would be very user-facing and repeated throughout the code, I want to make sure they're abundantly clear.
    • First, would sizing_mode be more descriptive than compute_mode? I want to find something a bit more clear.
    • What about size_by_feedstock and size_by_product instead of what's there? Should normal be size_by_capacity or size_by_config or something else then?
  • Should there a default compute_mode? Should this vary model to model? With one of the modes being called normal it intuitively feels like it should be the default
  • I do like having both buy and sell price in the config, it took me a sec to reason out if we need both of them but I think the explicitness is good
  • Nitpick: On the slides, like on slide 4, and we have "ignored" inputs and outputs, what does this mean in the code? Will those parameters appear in the n2 in OpenMDAO or are they not instantiated at all? Looking at the code, it looks like they don't get initialized at all. If so, I'd suggest a different word than "ignored", more like "not initialized" or similar. I'm probably overthinking this.
  • How do we enforce that connected upstream converters must also be in product_size mode? I guess we could add pretty reasonable checking at the h2integrate_model.py level
  • Does it make sense, with this amount of potential boilerplate, to have performance base classes and cost base classes? Would it simplify the flow of creating converters that operate in these different modes?

Comment on lines +44 to +47
profile_name = self.config.commodity + "_profile"
path = self.config.profile
profile = pd.read_csv(path, header=None).values[:, 0]
self.add_input(profile_name, units=self.config.unit, val=profile)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like this approach. At first I was going to advocate for having the file existing be optional so the profile could also be passed in as an OpenMDAO array instead of reading from a file, but that seems unnecessarily complex at this stage. No changes needed!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this could be kinda important for the ammonia/ASU interaction or ammonia/electrolyzer interaction. I think it'd be hard to figure out exactly but I think that I'd more often expect the product demand profile to come from another technology as an output rather than being read from a file. I might be missing something though.

Comment on lines +74 to +80
sell_price (float): The selling price of the commodity
is_coproduct (bool): Whether or not the commodity is a co-product that can be sold
unit (str): The units that the demand profile is in
"""

commodity: str = field()
sell_price: float = field()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

naming: sell_price up here and buy_price in the compute

@@ -0,0 +1,555 @@
{
Copy link
Copy Markdown
Collaborator

@johnjasa johnjasa Aug 12, 2025

Choose a reason for hiding this comment

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

I'm not sure what you mean by "The product_profile will simply act as an "end cap"" -- could you maybe rephrase or clarify? Is it essentially a "sink" for an outputted commodity? I bet as I dig more into the code this will be more clear.


Reply via ReviewNB

@bayc bayc self-requested a review August 12, 2025 19:47
@bayc bayc added the enhancement New feature or request label Aug 12, 2025
@jaredthomas68
Copy link
Copy Markdown
Collaborator

jaredthomas68 commented Aug 12, 2025

Comment on naming:

  • general: more explicit names to avoid confusion

  • mode: I think names like "technology_sizing_mode" would be more clear

  • mode name suggestions:

    • size_technology_by_feedstock
    • size_technology_by_output_demand
    • size_technology_by_config_inputs

if self.config.compute_mode == "product_size":
profile_name = self.config.commodity + "_profile"
path = self.config.profile
profile = pd.read_csv(path, header=None).values[:, 0]
Copy link
Copy Markdown
Collaborator

@elenya-grant elenya-grant Aug 12, 2025

Choose a reason for hiding this comment

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

I think profile should be able to be input as any of the following options:

  • str: filepath to timeseries profile (may be useful for users to specify the column name to use)
  • pathlib.Path: filepath to timeseries profile (may be useful for users to specify the column name to use)
  • list or array: time series profile
  • int or float: constant demand value at each timestep that can be converted into a timeseries
  • input from other technology

if residual_ratio > min_residual_ratio:
elec_kw -= h2_residuals * kwh_kg

outputs["electricity_consume"] = elec_kw
Copy link
Copy Markdown
Collaborator

@elenya-grant elenya-grant Aug 12, 2025

Choose a reason for hiding this comment

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

this should be outputs["electricity_consume"] = power_to_electrolyzer_kw or
outputs["electricity_consume"] = h2_ts["Power Consumed [kWh]"]

@jmartin4u jmartin4u changed the title Example of new compute methods for auto-sizing components using feedstock and product profiles Demonstrating different sizing modes with H2 electrolyzer Aug 26, 2025
Copy link
Copy Markdown
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, Jonathan! I pushed up some changes directly, we talked about the PR we brought in, and I feel great about this work.

@johnjasa johnjasa dismissed elenya-grant’s stale review December 16, 2025 16:21

I asked Elenya if I could merge this in and she said "oh yes sure thing"

@johnjasa johnjasa merged commit 8f5499b into NatLabRockies:develop Dec 16, 2025
5 checks passed
@johnjasa johnjasa mentioned this pull request Dec 18, 2025
johnjasa added a commit that referenced this pull request Dec 18, 2025
* Example set up to use doc co2, need to updated mcm locally

* Running with co2 connection (not correctly)

* Running example with plots

* Making tighter plots

* Plot colors

* Making new folder for methanol doc example

* Repopulating co2h example

* Methanol doc with financials

* Config updates from merge

* Getting tests passing

* Example chart set up

* Changelog update

* Tests fixes

* Fix test

* Adding line to skip mcm test if not installed

* update comments

* Splitting electricity

* CO2 storage working, need to check timeseries

* Remove wind file

* Reasonable asset sizing

* Optimized

* Test fix

* Fix precommit

* Removed co2 capture rate mt

* Switching lots of tech config values from a .csv (#242)

* Switching HB cases

* Docstring updates

* Running while checking data types

* Test getting there

* Test working

* Docs

* Updated docs and tests

* pre-commit fix

---------

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

* Custom Finance Model (#247)

* intermediate udpates to h2integrate_model for user defined custom finance models

* added ability to have user defined custom finance model and showcased in example 8

* updated docs

* updated CHANGELOG

* Minor reordering in docs

* Fix pre-commit spacing

* simplified simple_lco finance model in example 8

* updated doc page based on feedback

* updated example 8 test value because of prior changes to wind resource

---------

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

* Throw error for missing resource or missing resource connection (#284)

* added errors for missing resource connection or missing resource

* indented assert statements in new tests

* Minor error message updates

---------

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

* minor clean up

* minor clean up

* Removing commented out config block

* Fix local test failures on test_hybrid_energy_plant_example (#283)

* Test fixed

* Fix precommit

* Adding iterations in driver_config

* commodity-neutral transporters and basic operations (#293)

* 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

* update docs

* fix example test

* Added tests for consumption summer

* Combined generic summers for production and consumption

* remove extra unused code

---------

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

* Updated/Fixed SQL Recording (#291)

* updated set_recorders and added call to it in h2integrate_model.py

* updated changelog

* added tests for updates to recorder

* updated conftest to prevent errors

* removed env variables from test_recorder in attempt to fix CI tests

---------

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

* Flexible Finance Streams (#294)

* 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

* removed old examples from ng firming work

* updated example 19 and tests for commodity stream and updated generic summer units

* updated technologies in battery finance subgroup in example 19

* added commodity stream to ex 15 to test functionality with combiner

* fixed bug with doc and oae

* made subtest for ex 19 more clear

* added comments to plant configs

---------

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

* GOES Solar Resource Models (#279)

* added solar resource draft

* started adding doc strings for solar resource

* added solar resource api calls

* added solar resource api calls

* added solar resource docs

* added solar resource data file from goes api call

* added solar resource dir to gitignore

* added tests for solar resource and updated pysam solar tests

* updated solar cost model tests

* added docstrings and inline comments to pysam pvwatts model

* Adding init file

* removed legacy solar resource tests

* removed legacy solar resource files

* updated year for solar resource test

* added all goes api models

* added all solar resource datasets to supported models

* renamed goes_v4_solar_api to goes_aggregated_v4_solar_api

* updated solar resource imports for tests

* updated solar resource docs

* removed old solar resource model

* added tests for other goes solar resource models

* updated changelog

* cleaned up docs

* added regions covered to docs

* doc clean up

* fix typos

* remove commented code

* renamed solar resource models

* updated docs to explain tmy tgy and tdy

* Minor doc changes and streamlined setup methods for GOES

* fixed breaking tests

---------

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

* Sprucing up plots for white paper

* Add a bool to driver_config for creating OM reports (#308)

* Added bool for turning off OM reports

* Reverting framework test

* Added test for create_om_reports

* Minor opt formulation fixes (#317)

* Pyomo dispatch (#211)

* refactor open loop controller classes

* update inputs for control model functionality

* refactor model processing

* pre-commit formatting updates

* missing driver_config from refactor

* pre-commit formatting fix

* adding missing driver_config declaration to open loop controller base class

* shift from generic  to

* correct incorrect comment

* new controller directory structure

* add *_out/ to .gitignore to avoid clutter

* edit change log

* demand controller working and tested in single-tech system

* add h2 dispatch example

* working with pass through

* complete h2 dispatch example and corresponding example test

* h2 dispatch example plot

* add doc strings and other comments/explanations

* update docs

* rename control_model to control_strategy

* update changelog and test_all_examples

* update example for h2 rule-based dispatch

* add PyXDSM output to .gitignore

* rename control_methods to control_strategies

* rename

* rename

* restore openloop_controllers.py from develop

* replace old openloop contents with new

* remove control_strategies/openloop_controllers.py

* move openloop_controllers.py to control_strategies directory

* move openloop_controllers.py back to controllers/

* fix typo

* revert cost_coeffs.csv changes

* update examples for financial group default naming and control naming changes

* typing adjustment reverted by hook

* Removed time_steps as an input to controllers

* minor refactor to demand controller

* create base class for Pyomo dispatch rules for individual technologies

* Made demand profile available as an OpenMDAO input

* Added back persistent variables

* add infrastructure for pyomo dispatch

* input files for pyomo dispatch test

* remove debugging artifacts

* remove copy shape from demand profile to allow users to specify the demand profile in the config

* revert base class start

* enable passing of pyomo objects for pyomo dispatch

* add battery baseclass

* add initial pysam battery wrapper; note, not fully functional

* add heuristic dispatch controller for battery from HOPP

* include dispatch rule framework

* add heuristic dispatch test

* generalize heuristic dispatch and change battery units to kW from MW

* update for financial input rework

* restructuring control and dispatch folders

* split out pyomo comtrol tests

* move previously missed pyomo test

* wip

* move storage pyomo rules to storage rules base class

* propogate use of baseclass for pyomo rules to technologies

* successfully pass rules

* dynamically set pyomo rule names

* allow dispatch rules in dispatch tech

* pass pyomo_dispatch_solver to storage performance model

* reorder so control and dispatch rules are put into tech groups first

* updating pysam battery model

* add more pseudo code

* update pysam battery model

* update pyomo controller, separating from openloop controller

* WIP: heuristic controller test update

* a step to generalize matching dispatch techs group names

* update heuristic load following battery dispatch test

* generalize the return of pyomo blocks

* bring in changes from elenya-grant/dev/battery to allow battery tests to run

* add logic for over charging/dischargin and move demand to be an openMDAO input

* update test values for new logic and add demand as openMDAO input

* updated battery dispatch tests to included min and max SOC tests

* Battery cost model and updates to performance model (#3)

* added battery cost model and updated pysam battery so capacity is input
---------

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

* run pre-commit hooks back to fc3bbde

* precommit adjustments

* update heuristic battery dispatch

* update h2storage naming

* increase grid limit value so it is not a limiting factor

* set default value for grid_limit to be high

* remove grid limit from test input file

* update test for heuristic battery controller

* rename test input folder for h2_storage

* generalize naming to be technology agnostic

* update to get n_timesteps and dt from plant_config

* update electricity out from battery to remove charged energy

* WIP: example 18; NOTE: mod in h2integrate_model is stand-in for demand module

* fix typo

Co-authored-by: John Jasa <john.jasa@nrel.gov>

* fix typo

Co-authored-by: John Jasa <john.jasa@nrel.gov>

* Update h2integrate/storage/battery/pysam_battery.py

Co-authored-by: John Jasa <john.jasa@nrel.gov>

* Update h2integrate/core/h2integrate_model.py

Co-authored-by: John Jasa <john.jasa@nrel.gov>

* Reworked setup order in H2I

* update pysam battery logic to finally be correct, plus example

* updating test and example

* WIP: update h2storage to use new heuristic structure

* battery control pyomo tests all passing

* refactor demand no longer required by performance model

* wip: separation of dispatch and simulate

* Removed policy_parameters throughout

* removed unused tech_config_heuristic in test_controllers

* removed cost_year from WindPlantCostModelConfig

* removed unused battery baseclasses

* removed policy parameters from test_controllers plant configs

* wip: fix pysam battery usage

* wip: debug p_chargeable

* wip: adding local checks

* Making pyomo control options a config

* Updating after merge

* Merging; pre-commit fix

* finance fix

* correct logic and update tests

* swap np.max for np.maximum

* Working on testing (#4)

* units fix and merge_shared_inputs
* Update SOC start value
* Update battery power output keys and adjust tolerances
* update tests

---------

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

* get all tests passing

* update example 14

* update names from 'resource' to 'commodity'

* add abs_tol for max SOC test

* add rtol to max SOC test

* adjust tol

* adjust tol for unmet demand test

* add more checks on how much power the battery can charge or discharge

* update tolerance

* adjust tol

* adjust expected values

* rename resource to commodity for dispatch and battery. print warning if unable to generate xdsm diagram rather than raising an error

* remove internal battery sizing method in favor of using the builtin one from PySAM.

* remove commented code

* update comments and doc strings based on feedback

* update doc strings and validators

* add test for example 18

* remove code from usage: pyomo [-h] [--version]
             {build-extensions,convert,download-extensions,help,install-extras,model-viewer,run,solve,test-solvers}
             ...

This is the main driver for the Pyomo optimization software.

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit

subcommands:
  {build-extensions,convert,download-extensions,help,install-extras,model-viewer,run,solve,test-solvers}
    build-extensions    Build compiled extension modules
    convert             Convert a Pyomo model to another format
    download-extensions
                        Download compiled extension modules
    help                Print help information.
    install-extras      Install "extra" packages that Pyomo can leverage.
    model-viewer        Run the Pyomo model viewer
    run                 Execute a command from the Pyomo bin (or Scripts)
                        directory.
    solve               Optimize a model
    test-solvers        Test Pyomo solvers

-------------------------------------------------------------------------
Pyomo supports a variety of modeling and optimization capabilities,
which are executed either as subcommands of 'pyomo' or as separate
commands.  Use the 'help' subcommand to get information about the
capabilities installed with Pyomo.  Additionally, each subcommand
supports independent command-line options.  Use the -h option to
print details for a subcommand.  For example, type

   pyomo solve -h

to print information about the `solve` subcommand. branch that will be saved for the  pr later

* fix example 14 plant input

* remove changes that have been saved in  for later pr

* roll back h2 pyomo dispatch - save for later in
'pyomo_h2' for another pr

* pull dt and n_timesteps from plant_config

* move h2 pyomo test inputs out of pyomo and into pyomo_h2 for a later pr

* move input_power from being a discrete_input for openmdao to being in the input yaml and config

* make names in battery and control more explicit

* create pysam battery with pyomo heuristic system test

* include generic converter rules

* change 'excess' to 'unused' in accordance with naming discussion

* remove h2 storage rules

* shift to generic dispatch for pyomo with storage techs

* adjust test from battery dispatch rules to generic dispatch rules

* update modify_tech_config function to run model.setup() internally by default, with the option to not run model.setup()

* change location for example 18 (wind battery dispatch) to match example 19 (simple dispatch) to avoid saving more resource files in git

* remove TODOs that are not needed in this PR anymore.

* update doc strings

* generalize pyomo storage rules

* remove comments specific to pyomo_opt

* edit doc string

* include notebook version of example 18

* remove notebook version

* add control framework documentation

* repair errors arising due to renaming

* update changelog

* rename test, rename example 18 input yaml

* unify unit specifications to rates and unify names between all techs

* update resource_name to commodity_name, resource_units to commodity_units, and kg to kg/h

* revert switch from excess_acid to unused_acid

* update docs after bringing in commodity stream PR (#294)

* update links in control docs

* update doc strings to clarify what is included in commodity_out for storage and control

* correct naming for h2 storage input for electrolyzer rating

* change from battery_electricity_out to battery_electricity_discharge and add some test cleanup

* correct naming typo and add pyomo comment in docs

* Update docs/control/control_overview.md

Co-authored-by: John Jasa <john.jasa@nrel.gov>

* Update docs/technology_models/pysam_battery.md

Co-authored-by: John Jasa <john.jasa@nrel.gov>

* Update docs/technology_models/pysam_battery.md

Co-authored-by: John Jasa <john.jasa@nrel.gov>

* Update examples/18_pyomo_heuristic_dispatch/18_run_pyomo_heuristic_dispatch.py

Co-authored-by: John Jasa <john.jasa@nrel.gov>

* Update examples/18_pyomo_heuristic_dispatch/18_run_pyomo_heuristic_dispatch.py

Co-authored-by: John Jasa <john.jasa@nrel.gov>

* put error in place for compute method of PyomoRuleBaseClass

* remove incorrect error raising and correct comment

* change from _demand_in to _demand

* rename run script for example 18

* add comments

* Update h2integrate/storage/battery/battery_baseclass.py

Co-authored-by: John Jasa <john.jasa@nrel.gov>

* Update h2integrate/storage/battery/battery_baseclass.py

Co-authored-by: John Jasa <john.jasa@nrel.gov>

* update pysam battery call without controller to have a pseudo control option

* Update h2integrate/storage/battery/pysam_battery.py

Co-authored-by: John Jasa <john.jasa@nrel.gov>

* Update h2integrate/storage/battery/pysam_battery.py

Co-authored-by: John Jasa <john.jasa@nrel.gov>

* remove finance parameters because they are unused - we are only testing control and battery outputs here

* update docs

* Update h2integrate/storage/battery/battery_baseclass.py

Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com>

* Update h2integrate/control/control_rules/converters/generic_converter.py

Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com>

* move battery tests to battery directory

* open loop html

* Apply suggested doc updates from code review

Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com>

* updating formatting to fix tests

* fixing formatting for pre-commit hooks

* fixing formatting from including suggestions from code reivew

* more pre-commit fixes

* add error message if provided tech_name does not match the actual tech name

* Consolidated pyomo controller test files

* include file for testing that was left out

* include file for testing that was left out

* update docs to clarify system_commodity_interface_limit

* update min/max storage fraction handling to use provided limits

* remove unused battery themal function (it is in PySAM BatteryTools)

---------

Co-authored-by: bayc <christopher.j.bay@gmail.com>
Co-authored-by: John Jasa <johnjasa11@gmail.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: John Jasa <john.jasa@nrel.gov>
Co-authored-by: kbrunik <kbrunik@gmail.com>
Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com>
Co-authored-by: Genevieve Starke <genevieve.starke@nrel.gov>

* added conftest files to prevent clutter (#311)

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

* Updated recorder to be attached to driver or model (#295)

* updated recorder to be attached to driver or model

* Minor cleanup to recorder logic

---------

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

* updated api docs to include more useful information (#323)

* Sync battery cost model and controller inputs (#290)

* synced up battery cost model inputs and demand openloop controller inputs

* cleaned up battery cost model

* updated battery cost model and openloop controller tests

* added test for battery cost with demand openloop controller

* updated changelog

* merging

* Renaming resource rate units to commodity units

* Updated example 18

* updated demand openloop controller and atb battery cost model

* added generic storage cost model

* Updating to remove battery mentions in generic cost model comments

* updated based on reviewer feedback

* added user warning to atb battery cost model

* updated failing tests

* fixed example 3 input file to prevent failing tests

---------

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

* PySAM Wind and Basic Turbine Layout (#306)

* added intermediate wind plant refactor with new validator

* updated wind plant and added layout method

* merged wind_plant_pysam

* 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

* Minor syntax changes

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

* added atb wind cost model

* added wind atb cost model to supported models

* update docstrings

* update docs

* updated example 26 to use wind ATB cost model

* Fixing some tests; added example 22 in

* WIP; reworking examples

* add turbine plotting for pysam wind model

* Removing errant examples

* pre-commit fixes

* remove default turbine spacing for basic grid layout

* Added wind plant doc page

* Removed natural gas examples test script

* Updating example 16

* update examples to run pysam wind converter and use wind atb cost model

* remove basic windplant performance and cost models

* update docs

* update docs tech overview

* tests

* Fixing test_tools.py

* Updated pyomo example due to wind plant changes

---------

Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com>
Co-authored-by: John Jasa <johnjasa11@gmail.com>
Co-authored-by: bayc <christopher.j.bay@gmail.com>

* Added CsvGenerator option for design of experiments (#314)

* added example input files

* added csv generator as doe option and new methods to check the csv file beforehand

* minor bugfixes and updates

* added jupyter notebook for example 20

* Added doc page and updated pyproject.toml

* added test for unique filename function

* updated CHANGELOG.md

* updated example 20 jupyter notebook

* added test for new example with csv gen

* Minor changes during review

* added inline comments to utilities function

---------

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

* Net Present Value Financial Models (#310)

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

* updated npv calc inputs

* added draft version of NPV financial calc

* update commodity

* example with NPV

* fixed cost breakdown column renaming

* add var om

* update integration test

* add npv integration test

* Moved commodity sell price to an input

* updated finance models so npv has model and commodity specific inputs and outputs to prevent errors and no unused outputs in npv

* fixed lco breakdown function and added tests for some profast tools

* added lco breakdown output to profast and simple profast test

* add integration test for profast npv

* added tests for profast npv and moved prexisting finance tests

* added test for simple npv model

* updating naming convention in simple npv

* updated commodity sell price input name for simple npv

* update naming to finance

* change units for clarity

* base ProFAST baseclass and added new finance models to supported models

* added coproduct to ProFAST base class

* Adding comments and a test from PR reviews

* update documentation

* reduce naming logic for outputting results

* update pathname

* remove discount rate comments that were not quite right

---------

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 functionality for loading yamls and finding files (#313)

* moved some functions from validation to utilities and added new functions

* updated load_yaml import

* added tests for new functions

* updated load_config and collect_custom_models in H2IntegrateModel

* bugfix in yaml dump

* updated changelog

* attempted bugfix for test_geologic_h2

* updated find_file to fix failing tests

* updated find_file()

* added error for unexpected situation in find_file

* added more detailed error message for debugging

* added more detailed value error response

* hopefully added bugfix

* Adding docstring and comments

* minor cleanup to utilities

* added docs on file searching

* changed title for new doc page

* updated logic for handling absolute paths

* Docs updates

* Minor refactoring and docstring updates for filepath handling

* minor clarification in docs and updated config_file to config_input

* minor bug fix in find file function

---------

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

* Recording and Loading SQL Files: Example and Doc page (#322)

* added recorder to example 8 and added docs for sql files

* Minor docs edits

* Minor docs edits

* added clarification to doc

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>
Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com>

* Merge Geologic Hydrogen Branch into Develop (#354)

* Synced up with spreadsheet model

* Fixing test assert values

---------

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

* Merge Iron Branch into Develop (#360)

* Switching HB cases

* Getting through to plot

* Fixing hydrogen ratio

* Running plots

* Changing TX site back to default

* Fix plot

* Removing methanol

* Made iron example files, no code to run them

* Creating wrapper

* It runs!

* Fixes to lca

* run_iron reproducing number from old setup

* added more inputs to iron wrapper, changed lcoe to be in USD per MWh

* minor cleanups to tech config and iron wrapper

* added test for baseline case

* added more iron tests and added docstring to IronConfig

* connected taconite pellet input

* added iron ore cost and performance model

* iron ore tests are passing

* cleaned up iron ore tests

* Renaming iron config inputs

* added init file

* added test init file

* added iron electrowinning model

* All iron cases being tested

* rename files

* Added iron to CI

* added iron transport model

* Updated ammonia synloop example

* Reverting changes to 12 example

* Fixes for some examples

* Reverting some HOPP wrapper changes

* updated test value for chicago iron ore transport

* added geopy to dependencies

* eaf wip

* finish testing

* Running iron_mine as example

* Old and new closely matching

* Getting ready to merge

* Reverting example

* Run all cases in example

* Fixing tests

* Fixing om test assertions

* Merge branch 'iron-dev2' into iron-merge2 (#341)

* remove ammonia changes

* update example number

* Removing h2integrate_simulation

---------

Co-authored-by: jmartin4 <jonathan.martin@nrel.gov>
Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com>
Co-authored-by: Jonathan Martin <94018654+jmartin4nrel@users.noreply.github.com>
Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Open-Meteo Wind Resource (#332)

* changed C to degC in wind resource baseclass

* added open-meteo wind resource model and tests

* updated pytest skiptest decorator for mcm package

---------

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: Jared Thomas <jaredthomas68@users.noreply.github.com>

* Natural Gas Plant operation with electricity demand (#334)

* pull update ng files

* updated natural gas example, tests and model

* update ng test

* update documentation

* Correctin NG test values

* updated system_capacity to system_capacity_mw

---------

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

* Improving the readability of the `post_process` method (#361)

* Removing the need for boundaries

* WIP: checkpointing potential print changes

* Using rich instead, looks nice

* Using rich instead, looks nice

* Cleaned up printing a bit

* Moved method to function

* Removed extra lines from plant_configs

* Apply suggestions from code review

Co-authored-by: Rob Hammond <13874373+RHammond2@users.noreply.github.com>

* Fixes based on input

* Added back solar resource after merge

* Added back solar resource after merge

---------

Co-authored-by: Rob Hammond <13874373+RHammond2@users.noreply.github.com>

* Fixing ammonia stoichiometry (#363)

* Fixing ammonia stoichiometry

* Updating changelog

* Removing size_mode

---------

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

* Minor bugfix to ProFAST output naming (#368)

* minor fix to profast output naming

* actually fixed output naming and added subtest to check

* Decoupled H2 Storage Performance and Cost Models (#324)

* split out h2 storage cost models

* updated cost models and made h2 storage auto sizing model

* updated h2 storage cost tests

* updated example 12 and remaining models using old h2 storage

* updated failing tests and removed old h2 storage model from supported models

* moved and updated mch tests

* added tests for mch wrapper but failing

* intermediate change

* updated and added tests for mch storage

* added doc strings for MCH model

* changed h2 storage autosizing and updated example input files

* generalized h2 storage auto sizing

* moved autosizing storage model

* removed h2sam as model option

* added docstrings and minor cleanups to h2_storage_cost

* added docstrings and updated docs

* fixed test_framework failing test

* update h2 storage model names

* added sizing_mode input to h2 cost models

---------

Co-authored-by: John Jasa <johnjasa11@gmail.com>
Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com>

* Post-processing: summarize data in .sql file and export to csv (#366)

* added methods to summarize data from sql file

* added recorder_path as attribute to h2i and added sql summarizing to post_process

* updated convert_sql_to_csv_summary to work if run in parallel

* added sbutests to example 20 to check csv summarizing

* minor fixes

---------

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

* Added library folder for commonly used inputs (#369)

* added library folder for pysam option files

* renamed pysam input files

* updated filenames in examples

* Update GeoH2 Subsurface Modeling (#367)

* update performance and cost models

* small mods

* 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

---------

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

* Standalone Iron Mine (#364)

* Switching HB cases

* Getting through to plot

* Fixing hydrogen ratio

* Running plots

* Changing TX site back to default

* Fix plot

* Removing methanol

* Made iron example files, no code to run them

* Creating wrapper

* It runs!

* Fixes to lca

* run_iron reproducing number from old setup

* added more inputs to iron wrapper, changed lcoe to be in USD per MWh

* minor cleanups to tech config and iron wrapper

* added test for baseline case

* added more iron tests and added docstring to IronConfig

* connected taconite pellet input

* added iron ore cost and performance model

* iron ore tests are passing

* cleaned up iron ore tests

* Renaming iron config inputs

* added init file

* added test init file

* added iron electrowinning model

* All iron cases being tested

* rename files

* Added iron to CI

* added iron transport model

* Updated ammonia synloop example

* Reverting changes to 12 example

* Fixes for some examples

* Reverting some HOPP wrapper changes

* updated test value for chicago iron ore transport

* added geopy to dependencies

* eaf wip

* finish testing

* Running iron_mine as example

* Old and new closely matching

* Getting ready to merge

* Reverting example

* Run all cases in example

* Fixing tests

* Fixing om test assertions

* added performance model for martin ore

* added cost model for martin ore

* added test for martin ore cost model

* added the start of some doc strings and comments

* added comments to test

* removed duplicate iron example

* fixed bug that was introduced in output_txt of profast_base

* added standalone iron mine performance models

* another profast bugfix to fix failing tests

* removed added ammonia example files

* removed commented out code and added docstrings

* Comparing old and new mine

* Adding cpi back in to cost_model

* updated handling cost year in martin mine cost model

* updated cost model to handle target dollar years outside of cpi range

* removed duplicate coefficient files

---------

Co-authored-by: jmartin4 <jonathan.martin@nrel.gov>
Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com>
Co-authored-by: Jonathan Martin <94018654+jmartin4nrel@users.noreply.github.com>
Co-authored-by: kbrunik <kbrunik@gmail.com>

* Ability to sweep sites in design of experiments (DOEs) (#336)

* attempted adding latitude and longitude as inputs

* made example for lat lon sweep

* got sweeping sites to work in example 22

* added test for new example

* added solar resource file for example 22

* added lat and lon to river resource to prevent errors

* added subtest for example 15 on resource filepaths

* added logic on whether or not to change resource location

* added new approach for resolving complex logic to handle edge-cases

* minor updates

* updated openmeteo wind api wrapper to take lat/lon as inputs

* updated doc page and changelog [skip ci]

* Minor changes

* minor changes based on feedback

* updated resource variable to determine whether to update resource data

* updated example 22 run script to write csv summary of sql file

* minor comments added to resource_base

* updated docstring in resource base

* edgecase bugfix in resource_base

* actually fixed edgecase bug

---------

Co-authored-by: kbrunik <102193481+kbrunik@users.noreply.github.com>
Co-authored-by: John Jasa <johnjasa11@gmail.com>

* prettified postprocessing outputs a little bit (#378)

* NSRDB Solar Resource Models for Himawari and Meteosat Prime Meridian (#377)

* added meteosat prime meridian models

* added himawari solar api models

* added himawari tmy dataset

* added tests and new resource files for added new solar resource models

* added pvwatts integration tests with resource

* added new solar resource models to supported_models.py

* added doc pages for new models

* updated changelog

* finished updating doc pages

* renamed file and class for solar api baseclass and updated imports

* Corrected 'himwari' -> 'himawari' throughout

---------

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

* Pin jupyter-book version in pyproject.toml

* Fix typo in CONTRIBUTING.md note section (#383)

* Load Demand Component (#328)

* added flexible load demand component

* Update h2integrate/core/load_demand.py

clean up ramping constraint flexibility

Co-authored-by: John Jasa <john.jasa@nrel.gov>

* change upper bound on some demand inputs

* Minor changes to flexible demand

* minor change from feedback

* added flexibility constraints as inputs to load demand

* updated recorder

* cherry-pick smash; fix bad merging

* updated load demand inputs and outputs to align with controllers

* removed lines in pose_optimization that arent relevant to this PR

* aligned demand input naming

* updated ex 19 to define demand w load_demand component

* minor change to validator in demand openloop controller

* moved and renamed controllers

* reverted changes to example 19

* added some docstrings to converter openloop controllers

* added some more minor docstrings

* inheritance reorg

* rename files

* move tests

* converter test

* homogenize naming

* docstrings

* docs

* example

* remove unused files

* flexible example

* added unit tests for flexible demand

* minor updates to docs for flexible load

* Fix desc for ramp up

* added rated_commodity_demand as input to flexible demand controller

* docs reorg

* typo

* minor updates to comments and docstrings [skip ci]

* Modifications based on PR feedback

---------

Co-authored-by: elenya-grant <116225007+elenya-grant@users.noreply.github.com>
Co-authored-by: John Jasa <john.jasa@nrel.gov>
Co-authored-by: John Jasa <johnjasa11@gmail.com>

* Grid Components (#340)

* grid models

* Added grid as feedstock

* update examples

* add grid buying converter

* clarify units with parentheses

* Adding singular grid component

* Cleaning up grid files

* Removed unnecessary tests

* add grid to elec producing techs list

* Updated tests due to changes from develop

* added coproduct test and bugfix in profast base

* Minor updates based on PR feedback

* Iterations based on PR feedback

* Updated names in test

* docs wip

* Updated example path

* Added readme for example 23

* docs

* fix tests

* Updates to grid doc

* Updated grid example

* Updating grid example number

* Grid updates based on PR feedback

---------

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

* geo h2 doc page (#380)

* geo h2 doc page

* Updated geoh2 docs minorly

---------

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

* New PR Template (#390)

* update PR template

* update based on PR feedback

* PR feedback

* Removing more of old GreenHEART (#384)

* Removing unneeded files and tests

* WIP working through steel

* Removed offshore

* Deleting more old files

* Removed simple unused files

* Moving basic H2 cost

* Removed defunct pressure vessel and pem_control_type

* Removed old tests

* Updated test values

* moved singlitico model

* Removing unused electrolyzer files

* Added back pem master

* Moving PEM model

* Big refactor and removal of hydrogen storage from simulation/technologies

* Shifting more electrolyzer files

* Fixed and noted behavior

* Fixed bug in steel calc config for o2 heat integration

* Moving iron files and adding back singlitico test

* Fixed iron transport

* Reverted steel example test values

* Reverted hydrogen storage test values

* fixing iron paths

* Updates for PR

* Updating based on PR comments

* removed h2 pipe code and tests

* Added back many more docstrings and comments for the hydrogen storage

* fix tests

* Removing defunct code per PR review

* Minor refactoring based on PR feedback

* Added note on primary commodity electricity tech

---------

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

* Allow for starts-with matching for technology names in electricity producing techs (#397)

* allow starts with matching and not just exact matching in electricity_producing_techs

* add tests for is_electricity_producer

* add error check that custom models are not created with the same name and different class definitions

* update doc

* Added note on primary commodity electricity tech

---------

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

* Correct name spelling from 'Corey' to 'Cory'

* Update LICENSE to remove ProFAST note

Removed note about ProFAST model license agreement.

* add zenodo citation

* Update CHANGELOG with new features and improvements corresponding to PR #397 (#411)

Updated changelog to include new features and improvements relevant to PR #397 that were accidentally not push prior to merging.

* Allow generic combiner to handle as many inflow streams as desired (#406)

* make generic combiner able to handle as many inflows as desired

* update changelog, docstrings, and combiner test for multiple inflow streams >2

* update docs

* update docs

---------

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

* Demonstrating different sizing modes with H2 electrolyzer (#198)

* Attempting standalone pem

* feedstock_size mode working with profiles

* Working all 3 modes

* Added demo notebook

* Typographical changes in ex 14 doc

* Restoring electrolyzer_size_mw_cost name

* Updating example post-merge

* Renaming for smaller PR

* Removing feedstock and product profiles to simplify PR

* Defining sizing modes in electrolyzer

* Getting modes properly named

* Need access to full tech_config

* Example working

* Solving all the way to pf.solve_price in iterative mode

* Notebook updated

* Added iterative mode

* WIP: working on iterative grouping

* Updating tech_configs

* Updated to work in H2I 0.4

* Attempting to get all tests passing

* Tests be passin

* Fixing notebook

* Iterative mode 'working'

* Updates to make iterative mode work

* Minor changes based on chat with Jonathan

* Removing whole tech config

* Updating new example

* Renaming electrolyzer size variable

* COBYLA working with one converter...

* Removing resize_by_tech

* Optimizer running with multiple converters

* Co-optimizing successfully

* Adding capacity factors

* Clarify capacity factors, fix wombat test

* Docs, changelog, docstrings

* Example number change

* Added tests for sizing modes

* PR cleanup

* Attempting JSONDecodeError fix

* Again attempting to fix JSONDecodeError

* Fix JSONDecodeError for real this time

* Fine I'll make separate config files

* Try moving the tests to test_all_examples?

* Revert "Try moving the tests to test_all_examples?"

This reverts commit bf1d7e3.

* Revert "Fine I'll make separate config files"

This reverts commit c032aca.

* Adding solar and wind resource filepaths

* Changes for elenya

* Added require_connection to profast total commodity inputs

* Minor typographical changes to sizing modes docs

* Minor changes to the sizing mode setup()

* Minor changes to the sizing mode setup()

* updated example 22 python script

* Changes for John's review

* Renaming resize_by_flow to flow_used_for_sizing

* Fixed failing finance tests by connecting total commodity produced

* Cleaning up example files

* Accidentally deleted a "t"

* Added IVC for total produced electricity

* Updated example number

* Resolving example name change

* Added back missing files from merge

* Moving size_mode to attr

* Updated size_modes throughout

* Updated ci to run

* Made all config classes kw_only

* Updated tests after kw_only change

* Fixed EAF test

* reverted CI branch change

* Added docstrings to hydrogen utilities

---------

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

* Moved last of the high-level tests (#412)

* Move h2 compressor test

* Moved iron tests

* Removed defunct files in tests

* Moved test all examples

* Removed last test folder at high level

* Reverted rosner cost coeffs

* Updated changelog

* Added back conftest

* Fixed test folder naming

* Added back init file

* Moved test

* Prepping for v0.5.0 release (#414)

* Updating changelog for v0.5.0

* Minor changelog modification

---------

Co-authored-by: jmartin4 <jonathan.martin@nrel.gov>
Co-authored-by: kbrunik <kbrunik@gmail.com>
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 <102193481+kbrunik@users.noreply.github.com>
Co-authored-by: Jasa <jjasa@nrel.gov>
Co-authored-by: Jared Thomas <jaredthomas68@users.noreply.github.com>
Co-authored-by: bayc <christopher.j.bay@gmail.com>
Co-authored-by: Chris Bay <12664940+bayc@users.noreply.github.com>
Co-authored-by: Genevieve Starke <genevieve.starke@nrel.gov>
Co-authored-by: Jared Thomas <jaredthomas68@gmail.com>
Co-authored-by: Rob Hammond <13874373+RHammond2@users.noreply.github.com>
@johnjasa johnjasa added the ammonia Related to the generation-following ammonia project label Jan 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ammonia Related to the generation-following ammonia project enhancement New feature or request ready for review This PR is ready for input from folks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants