Skip to content

Integrating methanol with Direct Ocean Capture CO2#239

Merged
jmartin4u merged 37 commits intoNatLabRockies:developfrom
jmartin4u:meoh-dev2
Oct 7, 2025
Merged

Integrating methanol with Direct Ocean Capture CO2#239
jmartin4u merged 37 commits intoNatLabRockies:developfrom
jmartin4u:meoh-dev2

Conversation

@jmartin4u
Copy link
Copy Markdown
Collaborator

@jmartin4u jmartin4u commented Sep 4, 2025

Integrating methanol with Direct Ocean Capture CO2

This sets up a new example in which the existing direct ocean capture tech is used to send CO2 to a CO2 hydrogenation methanol production plant located offshore on the Gulf. This plant also uses hydrogen from electrolysis powered by offshore wind with H2 storage and dispatch, tying a bunch of tech nicely together. The current example uses 312 MW of electrolysis (~ the size found feasible in the ECO project) combined with 2000 tons of H2 storage to keep a 100,000 tpy methanol plant fullyk supplied with the H2 it needs for most of the year, with some shortfall in the summer months when wind is lower. Currently there is not a CO2 storage and dispatch (at least not a working one - @kbrunik is there something we could implement from the DOC model?), so the methanol plant does not operate at full capacity.

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.

Impacted areas of the software

  • examples/03_methanol/co2_hydrogenation_doc: Added this example of DOC integrating with methanol, particular files of interest:
    • examples/03_methanol/co2_hydrogenation_doc/run_co2h_methanol.py: Script to run this example
    • examples/03_methanol/co2_hydrogenation_doc/plot_co2h_methanol.py: A plotting function imported into the above script which draws out all the material flows going into the methanol plant
  • converters/co2/marine/direct_ocean_capture.py: Fleshed out docstrings, added a co2_out output for interconnection
  • converters/co2/marine/marine_carbon_capture_baseclass.py: Added a co2_out output for interconnection
  • converters/methanol/methanol_baseclass.py: Added a total_methanol_produced output for ProFast finance calculations
  • converters/methanol/smr_methanol_plant.py: Added a total_methanol_produced output and corrected Opex calc for ProFast finance calculations
  • converters/methanol/co2h_methanol_plant.py: Added a total_methanol_produced output and corrected Opex calc for ProFast finance calculations
  • core/h2integrate_model.py: Removed methanol from lists of techs not to include in ProFast financial calculations

Additional supporting information

Test results, if applicable

DOC chart

@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

@jmartin4u jmartin4u requested a review from kbrunik September 5, 2025 19:12
@jmartin4u
Copy link
Copy Markdown
Collaborator Author

@johnjasa and @kbrunik - I built in a test to run my new integrated DOC/methanol example and it is passing locally. But on GitHub we're getting this error with the new test. Any reason why this error would pop up in my integrated test when it doesn't in the standalone DOC test? Idk how to debug since the test passes locally.

ImportError: The `mcm` package is required to use the Direct Ocean Capture model. Install it via:
 pip install git+https://github.com/NREL/MarineCarbonManagement.git

@jmartin4u
Copy link
Copy Markdown
Collaborator Author

@johnjasa and @kbrunik - I built in a test to run my new integrated DOC/methanol example and it is passing locally. But on GitHub we're getting this error with the new test. Any reason why this error would pop up in my integrated test when it doesn't in the standalone DOC test? Idk how to debug since the test passes locally.

ImportError: The `mcm` package is required to use the Direct Ocean Capture model. Install it via:
 pip install git+https://github.com/NREL/MarineCarbonManagement.git

I realized there was a line added before all the other tests with mcm:

@unittest.skipUnless(importlib.util.find_spec("mcm") is not None, "mcm is not installed")

Now tests are passing both locally (with mcm) and on GitHub (without mcm)

@jmartin4u jmartin4u marked this pull request as ready for review September 12, 2025 15:29
@kbrunik
Copy link
Copy Markdown
Collaborator

kbrunik commented Sep 17, 2025

@jmartin4nrel we can use the feature add from #248 for CO2 storage, it just got added to develop so it should be good to go

Copy link
Copy Markdown
Collaborator

@kbrunik kbrunik 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 making this Jonathan! It's a really cool extension of H2I's features with multiple flows combining into a single fuel. I'd love to see a few of the more recent feature adds in H2I get utilized in this PR and we can talk today about it. The other thing would be making the example a little more realistic by moving it near the coast or fully offshore. I can certainly help with some of these requested changes

Comment thread examples/03_methanol/co2_hydrogenation_doc/plant_config_co2h.yaml Outdated
Comment thread examples/03_methanol/co2_hydrogenation_doc/03_co2h_methanol.yaml Outdated
Comment thread examples/03_methanol/co2_hydrogenation_doc/driver_config.yaml Outdated
Comment thread examples/03_methanol/co2_hydrogenation_doc/plant_config_co2h.yaml
Comment thread examples/03_methanol/co2_hydrogenation_doc/plant_config_co2h.yaml Outdated
Comment thread examples/03_methanol/co2_hydrogenation_doc/tech_config_co2h.yaml Outdated
Comment thread h2integrate/converters/co2/marine/direct_ocean_capture.py
Comment thread h2integrate/core/h2integrate_model.py Outdated
commodity: "methanol"
finance_groups: ["methanol"]
technologies: ["methanol"]
# methanol:
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.

@elenya-grant this is the finance handling issue I'm talking about

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.

Still relevant?

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.

Yes haven't figured out why this is happening yet

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.

This looks nice to me! I really appreciate your example additions. The plotting method you added is real slick, too, that'll be quite useful for folks looking for more examples of how to postprocess H2I runs.

I pushed some small changes directly to the branch based on a comment from @kbrunik. Only last remaining question is about those two potentially extraneous wind resource files that Kaitlin noted. I won't request changes here so as to not hold up the PR!

commodity: "methanol"
finance_groups: ["methanol"]
technologies: ["methanol"]
# methanol:
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.

Still relevant?

Comment thread h2integrate/converters/co2/marine/direct_ocean_capture.py
Comment thread h2integrate/converters/co2/marine/direct_ocean_capture.py
from h2integrate.core.model_baseclasses import CostModelBaseClass


class CO2TankPerformanceModel(om.ExplicitComponent):
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.

Noting this for the future, no need to change in this PR. But for the next tank class we add to H2I we should genericize. I made an issue here: #292

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.

removed this since it wasn't used and generic storage was in the example

Copy link
Copy Markdown
Collaborator

@kbrunik kbrunik left a comment

Choose a reason for hiding this comment

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

I think it looks good to go! Thanks @jmartin4nrel for all your work on this effort

@jmartin4u jmartin4u enabled auto-merge October 7, 2025 17:17
@jmartin4u jmartin4u merged commit e950dd8 into NatLabRockies:develop Oct 7, 2025
5 checks passed
@jmartin4u jmartin4u deleted the meoh-dev2 branch October 16, 2025 21:31
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.

3 participants