-
Notifications
You must be signed in to change notification settings - Fork 27
Iron: Example with independently sized mine and iron/steel plant #433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jmartin4u
wants to merge
59
commits into
NatLabRockies:develop
Choose a base branch
from
jmartin4u:iron_mine_plant_diff_sizes
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
e52314a
added in-progress refactored iron winning models
elenya-grant 4d86b83
updated natural gas dri performance model
elenya-grant 5f82e24
updated docs in ng iron performance model
elenya-grant 6d2320c
Merge remote-tracking branch 'upstream/develop' into HEAD
kbrunik 08cbefe
updated iron cost model
elenya-grant ac33479
Merge branch 'iron/winning' of github.com:elenya-grant/GreenHEART int…
elenya-grant a18e9b0
updated coefficient paths for rosner iron plant models
elenya-grant d648213
updated example 21 and fixed bugs that were found
elenya-grant b37e190
minor updates to dri cost and perf models
elenya-grant c2971d2
added basic tests for new dri models
elenya-grant e35b17b
removed notes from rosner dri test
elenya-grant c21a777
double checked water costs and unit conversions and cleaned up some s…
elenya-grant b46fb20
Merge branch 'develop' into iron/winning
johnjasa a22e7c9
Merge branch 'develop' into iron/winning
kbrunik ca55caa
renamed ng iron reduction models and configs
elenya-grant 6a4b6de
renamed ng iron dri files
elenya-grant 25250ed
updated iron example tech config
elenya-grant f03ac12
added h2 dri cost and performance models
elenya-grant ad3f14b
added h2 dri models to supported models
elenya-grant 9444137
Merge branch 'develop' into iron/winning
kbrunik a33bffc
update test values for wombat version bump
kbrunik 59ed5e0
update unit test
kbrunik d7b7310
Merge branch 'wombat-update' into HEAD
kbrunik d356c23
update docstrings
kbrunik 868603a
update feedstocks to be per ton pig iron
kbrunik e30973b
merged supported models
elenya-grant 76949ec
refactored DRI performance and cost models to share baseclass
elenya-grant ebd56ae
updated electricity to not double count
elenya-grant 7e33bdf
added test for performance with limited feedstock availability
elenya-grant 5410238
eaf wip
kbrunik 51c0188
Merge branch 'iron/winning' of https://github.com/elenya-grant/GreenH…
kbrunik 14e918b
steel tests wip
kbrunik e8aca50
undo align
kbrunik 5b2050a
minor update on handling negative exponents in steel eaf cost model
elenya-grant 1383f2b
added carbon and lime to pipe
elenya-grant 991a716
update rosner eaf test
kbrunik 0baf6d7
draft update to iron example
elenya-grant e59dd59
Merge branch 'iron/winning' of github.com:elenya-grant/GreenHEART int…
elenya-grant 343708d
updated iron example to include steel eaf
elenya-grant ba7692f
updated doc page and changelog
elenya-grant cf04d4a
added small test for example 21
elenya-grant d8af3b1
Merge branch 'develop' into iron/winning
kbrunik d0fbd6a
Fix run_iron.py to actually compare old and new
jmartin4u cf0a839
Comparing old and new models
jmartin4u 442c5e7
Merge branch 'develop' of https://github.com/NREL/H2Integrate into ir…
jmartin4u 755435c
Old and new models matched up
jmartin4u 059c2ea
Cleaning up PR
jmartin4u be93312
Merge commit '1750b36ec077ebaf08c2665ed91c29d4ef359b96' into iron_min…
jmartin4u d4b726c
Merge remote-tracking branch 'upstream/develop' into iron_mine_plant_…
jmartin4u 0fd1485
Less goofy plant config and other cleanup
jmartin4u 03a4ba7
Going back to old coefficients with electricity in processing cost
jmartin4u 8432393
Fixed tests, need to document
jmartin4u 5d6f52c
Merge remote-tracking branch 'upstream/develop' into iron_mine_plant_…
jmartin4u 7f63887
updated example 21 so iron_ore_consumed is used for transport cost
elenya-grant 04779e5
Merge branch 'develop' into iron_mine_plant_diff_sizes
johnjasa 95a8db0
Some iron-related cleanup
johnjasa a43f5a7
Merge remote-tracking branch 'upstream/develop' into iron_mine_plant_…
jmartin4u fd83f60
Fixing test
jmartin4u 98ecb00
Merge branch 'develop' into iron_mine_plant_diff_sizes
johnjasa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Iron mine model | ||
|
|
||
| H2I contains an iron mine model that simulates the extraction of crude ore and its processing into iron ore pellets. | ||
| The main input feedstock is `crude_ore`, i.e. the unprocessed ore in the earth containing iron oxide. | ||
| The output commodity is `iron_ore` in the form of pellets that can be shipped to other plants (e.g. `iron_plant`) for further processing. | ||
|
|
||
| This model was developed in conjunction with the [University of Minnesota's Natural Resource Research Institute (NRRI)](https://www.nrri.umn.edu/). | ||
| NRRI compiled cost and production data from 5 existing mines and provided expertise for analysis at NLR to determine the energy input and cost trends across these mines. | ||
| Four of the mines (Northshore, United, Hibbing, and Minorca) are located in Minnesota, while one (Tilden) is located in Michigan. | ||
|
|
||
| There are two potential grades of ore produced from an iron mine in this model: | ||
| - Standard or Blast Furnace (BF) grade pellets (62-65% Fe) | ||
| - Direct Reduction (DR) grade pellets (>67% Fe) | ||
|
|
||
| It was determined that 3 of these mines (Northshore, United, and Hibbing) had crude reserves sufficient to produce DR-grade pellets, although only one (Northshore) reported production data on DR-grade pellets, with the rest reporting their data strictly on standard ore pellets. | ||
| The increases in cost and energy usage reported at the Northshore mine were used to project the potential performance and cost of DR-grade production at United and Hibbing. | ||
| The results of this analysis are compiled in the directory `h2integrate/converters/iron/martin_ore/`. | ||
| Performance data are included in `perf_inputs.csv` with cost data in `cost_inputs.csv`. | ||
|
|
||
| These data were compiled from two sources: | ||
| - The EPA's "Taconite Iron Ore NESHAP Economic Impact Analysis" by [Heller et al.](https://www.epa.gov/sites/default/files/2020-07/documents/taconite_eia_neshap_final_08-2003.pdf) - Capex estimates | ||
| - This document estimated the total percentage of cost spent throughout the entire industry on capital as a percentage of total production costs - 5.4%. This percentage is applied to the total annual production costs of each plant to find the estimated Capex. | ||
| - Cleveland-Cliffs Inc.'s Technical Report Summaries for individual mines - Opex and performance data | ||
| - [Northshore Mine](https://minedocs.com/22/Northshore-TR-12312021.pdf) | ||
| - [United Mine](https://minedocs.com/22/United-Taconite-TR-12312021.pdf) | ||
| - [Hibbing Mine](https://minedocs.com/22/Hibbing-Taconite-TR-12312021.pdf) | ||
| - [Minorca Mine](https://minedocs.com/22/Minorca-TR-12312021.pdf) | ||
| - [Tilden Mine](https://minedocs.com/22/Tilden-TR-12312021.pdf) | ||
|
|
||
| To use this model, specify `"iron_mine_performance_martin"` as the performance model and `"iron_mine_cost_martin"` as the cost model. | ||
| Currently, no complex calculations occur beyond importing performance and costs. | ||
| In the performance model, the "wet long tons" (wlt) that ore production is typically reported in are converted to dry metric tons for use in H2I. | ||
| In the cost model, the total capex costs for a plant are scaled by the amount of are produced annually. | ||
| Besides these calculations, previously-calculated performance and cost metrics are simply loaded from the input spreadsheets. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| name: "driver_config" | ||
| description: "This analysis runs a hybrid plant to match the first example in H2Integrate" | ||
| description: "Simply setting up an outputs folder, nothing fancy" | ||
|
|
||
| general: | ||
| folder_output: outputs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,124 @@ | ||
| """Example of an iron mine sending processed ore pellets to a separate DRI iron plant and EAF | ||
|
|
||
| In this example, iron ore pellets are produced at different iron mine locations in NE Minnesota. | ||
| These mines send processed ore pellets to a separate iron DRI plant located outside Chicago. | ||
| Four different cases are generated for four different iron mine setups in the `test_inputs.csv`. | ||
| The first two cases generate standard blast furnace gradepellets at two different mine locations. | ||
| The second two cases generate DR grade pellets at the same location, with the output capacity | ||
| varied to show how the capacity of the mine does not affect the levelized cost of iron_ore pellets | ||
| (LCOI), nor does it affect the final cost of the pig_iron produced by DRI (LCOP) or the cost of the | ||
| steel produced by the EAF (LCOS). | ||
|
|
||
| """ | ||
|
|
||
| from pathlib import Path | ||
|
|
||
| import numpy as np | ||
| import pandas as pd | ||
|
|
||
| from h2integrate.tools.run_cases import modify_tech_config, load_tech_config_cases | ||
| from h2integrate.core.h2integrate_model import H2IntegrateModel | ||
|
|
||
|
|
||
| # Create H2Integrate models - comparing old and new | ||
| # Create H2Integrate model | ||
| model = H2IntegrateModel("21_iron.yaml") | ||
| model_old = H2IntegrateModel("21_iron_old.yaml") | ||
|
|
||
| # Load cases | ||
| case_file = Path("test_inputs.csv") | ||
| cases = load_tech_config_cases(case_file) | ||
|
|
||
| # Modify and run the model for different cases | ||
| casenames = [ | ||
| "Case 1", | ||
| "Case 2", | ||
| "Case 3", | ||
| "Case 4", | ||
| "Standard Iron - Hibbing", | ||
| "Standard Iron - Northshore", | ||
| "DR Grade Iron - Northshore", | ||
| "DR Grade Iron - Northshore (adjusted)", | ||
| ] | ||
| lcois = [] | ||
| lcois_old = [] | ||
|
|
||
| # Create empty lists to store the costs | ||
| lcois_ore = [] | ||
| capexes_ore = [] | ||
| fopexes_ore = [] | ||
| vopexes_ore = [] | ||
| production_ore = [] | ||
| lcois_iron = [] | ||
| capexes_iron = [] | ||
| fopexes_iron = [] | ||
| vopexes_iron = [] | ||
| production_ore = [] | ||
| lcois_steel = [] | ||
| capexes_steel = [] | ||
| fopexes_steel = [] | ||
| vopexes_steel = [] | ||
|
|
||
| model.run() | ||
| model.post_process() | ||
|
|
||
| for casename in casenames: | ||
| model = modify_tech_config(model, cases[casename]) | ||
| model_old = modify_tech_config(model_old, cases[casename]) | ||
| model.run() | ||
| model_old.run() | ||
| model.post_process() | ||
| model_old.post_process() | ||
| lcois.append(float(model.model.get_val("finance_subgroup_pig_iron.price_pig_iron")[0])) | ||
| lcois_old.append(float(model_old.model.get_val("finance_subgroup_pig_iron.price_pig_iron")[0])) | ||
|
|
||
| # Compare the LCOIs from iron_wrapper and modular iron | ||
| print(lcois) | ||
| print(lcois_old) | ||
| lcois_ore.append(float(model.model.get_val("finance_subgroup_iron_ore.price_iron_ore")[0])) | ||
| capexes_ore.append( | ||
| float(model.model.get_val("finance_subgroup_iron_ore.total_capex_adjusted")[0]) | ||
| ) | ||
| fopexes_ore.append( | ||
| float(model.model.get_val("finance_subgroup_iron_ore.total_opex_adjusted")[0]) | ||
| ) | ||
| vopexes_ore.append( | ||
| float(model.model.get_val("finance_subgroup_iron_ore.total_varopex_adjusted")[0]) | ||
| ) | ||
| lcois_iron.append(float(model.model.get_val("finance_subgroup_pig_iron.price_pig_iron")[0])) | ||
| capexes_iron.append( | ||
| float(model.model.get_val("finance_subgroup_pig_iron.total_capex_adjusted")[0]) | ||
| ) | ||
| fopexes_iron.append( | ||
| float(model.model.get_val("finance_subgroup_pig_iron.total_opex_adjusted")[0]) | ||
| ) | ||
| vopexes_iron.append( | ||
| float(model.model.get_val("finance_subgroup_pig_iron.total_varopex_adjusted")[0]) | ||
| ) | ||
| lcois_steel.append(float(model.model.get_val("finance_subgroup_steel.price_steel")[0])) | ||
| capexes_steel.append( | ||
| float(model.model.get_val("finance_subgroup_steel.total_capex_adjusted")[0]) | ||
| ) | ||
| fopexes_steel.append( | ||
| float(model.model.get_val("finance_subgroup_steel.total_opex_adjusted")[0]) | ||
| ) | ||
| vopexes_steel.append( | ||
| float(model.model.get_val("finance_subgroup_steel.total_varopex_adjusted")[0]) | ||
| ) | ||
|
|
||
| # Compare the Capex, Fixed Opex, and Variable Opex across the 4 cases | ||
| columns = pd.MultiIndex.from_tuples( | ||
| [ | ||
| ("Levelized Cost", "[USD/kg]"), | ||
| ("Capex", "[USD]"), | ||
| ("Fixed Opex", "[USD/year]"), | ||
| ("Variable Opex", "[USD/year]"), | ||
| ] | ||
| ) | ||
| print() | ||
|
|
||
| df_ore = pd.DataFrame( | ||
| np.transpose(np.vstack([lcois_ore, capexes_ore, fopexes_ore, vopexes_ore])), | ||
| index=casenames, | ||
| columns=columns, | ||
| ) | ||
| print(df_ore) | ||
|
|
||
| print() | ||
| df_iron = pd.DataFrame( | ||
| np.transpose(np.vstack([lcois_iron, capexes_iron, fopexes_iron, vopexes_iron])), | ||
| index=casenames, | ||
| columns=columns, | ||
| ) | ||
| print(df_iron) | ||
|
|
||
| print() | ||
| df_steel = pd.DataFrame( | ||
| np.transpose(np.vstack([lcois_steel, capexes_steel, fopexes_steel, vopexes_steel])), | ||
| index=casenames, | ||
| columns=columns, | ||
| ) | ||
| df_steel = df_steel.iloc[2:] | ||
| print(df_steel) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for adding this doc page! It looks great!