NatLabRockies / NatLabRockies/H2Integrate

Feature request: standardize inputs and outputs of converters relating to input commodities

Open
#705 0 comments 0 reactions 1 assignee View on GitHub

@elenya-grant is already working on this.

Since Apr 24, 2026.

Dominant language
Python
Stars
26
Forks
44
Avg merge
3d 22h
Merged PRs (30d)
16

Description

Feature request: standardize inputs and outputs of converts relating to input commodities

When converters that have input commodity stream(s) (i.e., not input resource), there should some standardized outputs associated with these. Currently, the assumption is that they output commodity_in_consumed but this is not enforced or explcititly standardized.

Most likely, the standardization aspect would be done in the PerformanceModelBaseClass, whereas the definition of these input commodity streams would come from individual technologies (similar to the attributes of commodity, commodity_rate_units, and commodity_amount_units). However, rather than using strings, I think the input commodity streams should instead be defined as a dictionary.

Proposed solution

An example for the ammonia synloop model (which has inputs of electricity, nitrogen, and hydrogen)

def setup(self):
   self.commodity = "ammonia"
   self.commodity_rate_units = "kg/h"
   self.commodity_amount_units = "kg"
   self.commodity_in_streams_units = {
      "hydrogen": "kg/h",
      "nitrogen": "kg/h",
      "electricity": "kW",
}

One consideration for future usage/development would be whether the commodity in stream definition should also define commodity_amount_units (I don't think this would be necessary at this point).

Alternatives considered

Additional context

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.