diff --git a/docs/_toc.yml b/docs/_toc.yml index 65a8d886b..5bdabecd7 100644 --- a/docs/_toc.yml +++ b/docs/_toc.yml @@ -43,6 +43,7 @@ parts: - file: technology_models/geologic_hydrogen.md - file: technology_models/grid - file: technology_models/hydrogen_storage.md + - file: technology_models/iron_ewin.md - caption: Resource Models chapters: diff --git a/docs/technology_models/iron_mine.md b/docs/technology_models/iron_mine.md new file mode 100644 index 000000000..4cffc6604 --- /dev/null +++ b/docs/technology_models/iron_mine.md @@ -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 for further processing (`iron_plant` for instance). + +This model was developed in conjunction with the University of Minnesota's Natural Resource Research Institute (NRRI). +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 `h2integreate/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 esitmated 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 annualy. +Besides these calculations, previously-calculated performance and cost metrics are simply loaded from the input spreadsheets. diff --git a/examples/21_iron_mn_to_il/21_iron.yaml b/examples/21_iron_mn_to_il/21_iron.yaml index 33588912d..6028d728e 100644 --- a/examples/21_iron_mn_to_il/21_iron.yaml +++ b/examples/21_iron_mn_to_il/21_iron.yaml @@ -1,6 +1,6 @@ name: "H2Integrate_config" -system_summary: "This reference hybrid plant is located in Minnesota and contains wind, solar, and battery storage technologies. The system is designed to produce hydrogen using an electrolyzer and also produce steel using a grid-connected plant." +system_summary: "An iron mine producing ore pellets and a separately-located iron plant performing direct reduction." driver_config: "driver_config.yaml" technology_config: "tech_config.yaml" diff --git a/examples/21_iron_mn_to_il/21_iron_old.yaml b/examples/21_iron_mn_to_il/21_iron_old.yaml deleted file mode 100644 index 96cfa1943..000000000 --- a/examples/21_iron_mn_to_il/21_iron_old.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: "H2Integrate_config" - -system_summary: "This reference hybrid plant is located in Minnesota and contains wind, solar, and battery storage technologies. The system is designed to produce hydrogen using an electrolyzer and also produce steel using a grid-connected plant." - -driver_config: "driver_config.yaml" -technology_config: "tech_config_old.yaml" -plant_config: "plant_config_old.yaml" diff --git a/examples/21_iron_mn_to_il/driver_config.yaml b/examples/21_iron_mn_to_il/driver_config.yaml index d3b06a03e..c279b7f1b 100644 --- a/examples/21_iron_mn_to_il/driver_config.yaml +++ b/examples/21_iron_mn_to_il/driver_config.yaml @@ -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 diff --git a/examples/21_iron_mn_to_il/plant_config.yaml b/examples/21_iron_mn_to_il/plant_config.yaml index 1ef70a6fa..98006ef08 100644 --- a/examples/21_iron_mn_to_il/plant_config.yaml +++ b/examples/21_iron_mn_to_il/plant_config.yaml @@ -6,21 +6,22 @@ sites: latitude: 41.717 longitude: -88.398 -# array of arrays containing left-to-right technology -# interconnections; can support bidirectional connections -# with the reverse definition. -# this will naturally grow as we mature the interconnected tech technology_interconnections: [ - # connect feedstocks to iron mine - ["grid_feedstock","iron_mine","electricity","cable"], - ["mine_feedstock","iron_mine","crude_ore","pipe"], - # connect feedstocks to iron plant - ["iron_mine","iron_plant","iron_ore","iron_transport"], + # Connect feedstocks to iron mine. + ["mine_electricity_feedstock","iron_mine","electricity","cable"], + ["mine_crude_ore_feedstock","iron_mine","crude_ore","pipe"], + # Connect iron_ore price and processed_ore_feedstock to iron_transport + # Connect the LCOI of iron ore to the price of a feedstock component representing the ore to be used in DRI + ["finance_subgroup_iron_ore","processed_ore_feedstock",["price_iron_ore","price"]], + # Connect the ore feedstock available to the iron plant + ["processed_ore_feedstock","iron_plant","iron_ore","pipe"], ["dri_grid_feedstock","iron_plant","electricity","cable"], ["catalyst_feedstock","iron_plant","reformer_catalyst","pipe"], ["water_feedstock","iron_plant","water","pipe"], ["natural_gas_feedstock","iron_plant","natural_gas","pipe"], - # connect feedstocks to steel plant + # Use the iron ore consumed by the iron plant to calculate transport costs + ["iron_plant","iron_transport", ["iron_ore_consumed","iron_ore_in"]], + # Connect feedstocks to steel plant ["eaf_grid_feedstock","steel_plant","electricity","cable"], ["eaf_water_feedstock","steel_plant","water","pipe"], ["eaf_natural_gas_feedstock","steel_plant","natural_gas","pipe"], @@ -63,14 +64,12 @@ finance_parameters: iron_ore: commodity: "iron_ore" commodity_stream: "iron_mine" - technologies: ["iron_mine", "grid_feedstock", "mine_feedstock"] + technologies: ["iron_mine", "mine_electricity_feedstock", "mine_crude_ore_feedstock"] pig_iron: commodity: "pig_iron" commodity_stream: "iron_plant" technologies: - - "iron_mine" - - "grid_feedstock" - - "mine_feedstock" + - "processed_ore_feedstock" - "iron_transport" - "iron_plant" - "dri_grid_feedstock" @@ -81,9 +80,7 @@ finance_parameters: commodity: "steel" commodity_stream: "steel_plant" technologies: - - "iron_mine" - - "grid_feedstock" - - "mine_feedstock" + - "processed_ore_feedstock" - "iron_transport" - "iron_plant" - "dri_grid_feedstock" diff --git a/examples/21_iron_mn_to_il/plant_config_old.yaml b/examples/21_iron_mn_to_il/plant_config_old.yaml deleted file mode 100644 index e584c23a7..000000000 --- a/examples/21_iron_mn_to_il/plant_config_old.yaml +++ /dev/null @@ -1,55 +0,0 @@ -name: "plant_config" -description: "This plant is located in MN, USA..." - -sites: - site: - latitude: 41.717 - longitude: -88.398 - -# array of arrays containing left-to-right technology -# interconnections; can support bidirectional connections -# with the reverse definition. -# this will naturally grow as we mature the interconnected tech -technology_interconnections: [ - ["iron_mine","iron_plant","iron_ore","iron_transport"], - ["iron_transport","iron_plant","iron_transport_cost"], - ["finance_subgroup_iron_ore","iron_plant","price_iron_ore"], -] - -plant: - plant_life: 30 -finance_parameters: - finance_groups: - finance_model: "ProFastComp" - model_inputs: - params: - analysis_start_year: 2032 - installation_time: 36 # months - inflation_rate: 0.0 # 0 for nominal analysis - discount_rate: 0.09 # nominal return based on 2024 ATB baseline workbook for land-based wind - debt_equity_ratio: 2.62 # 2024 ATB uses 72.4% debt for land-based wind - property_tax_and_insurance: 0.03 # percent of CAPEX estimated based on https://www.nrel.gov/docs/fy25osti/91775.pdf https://www.house.mn.gov/hrd/issinfo/clsrates.aspx - total_income_tax_rate: 0.257 # 0.257 tax rate in 2024 atb baseline workbook, value here is based on federal (21%) and state in MN (9.8) - capital_gains_tax_rate: 0.15 # H2FAST default - sales_tax_rate: 0.07375 # total state and local sales tax in St. Louis County https://taxmaps.state.mn.us/salestax/ - debt_interest_rate: 0.07 # based on 2024 ATB nominal interest rate for land-based wind - debt_type: "Revolving debt" # can be "Revolving debt" or "One time loan". Revolving debt is H2FAST default and leads to much lower LCOH - loan_period_if_used: 0 # H2FAST default, not used for revolving debt - cash_onhand_months: 1 # H2FAST default - admin_expense: 0.00 # percent of sales H2FAST default - capital_items: - depr_type: "MACRS" # can be "MACRS" or "Straight line" - depr_period: 5 # 5 years - for clean energy facilities as specified by the IRS MACRS schedule https://www.irs.gov/publications/p946#en_US_2020_publink1000107507 - refurb: [0.] - cost_adjustment_parameters: - cost_year_adjustment_inflation: 0.025 - target_dollar_year: 2022 - finance_subgroups: - iron_ore: - commodity: "iron_ore" - commodity_stream: "iron_mine" - technologies: ["iron_mine"] - pig_iron: - commodity: "pig_iron" - commodity_stream: "iron_plant" - technologies: ["iron_plant"] # diff --git a/examples/21_iron_mn_to_il/run_iron.py b/examples/21_iron_mn_to_il/run_iron.py index 40ff5f014..a5ed81252 100644 --- a/examples/21_iron_mn_to_il/run_iron.py +++ b/examples/21_iron_mn_to_il/run_iron.py @@ -1,12 +1,14 @@ 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") @@ -14,24 +16,84 @@ # 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 = [] + +lcois_ore = [] +capexes_ore = [] +fopexes_ore = [] +vopexes_ore = [] +lcois_iron = [] +capexes_iron = [] +fopexes_iron = [] +vopexes_iron = [] +lcois_steel = [] +capexes_steel = [] +fopexes_steel = [] +vopexes_steel = [] + 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])) + 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 LCOIs from iron_wrapper and modular iron -print(lcois) -print(lcois_old) +# Compare the Capex, Fixed Opex, and Variable Opex across the 4 cases +columns = [ + "Levelized Cost\n[USD/kg]", + "Capex\n[USD]", + "Fixed Opex\n[USD/year]", + "Variable Opex\n[USD/year]", +] +df_ore = pd.DataFrame( + np.transpose(np.vstack([lcois_ore, capexes_ore, fopexes_ore, vopexes_ore])), + index=casenames, + columns=columns, +) +print(df_ore) +df_iron = pd.DataFrame( + np.transpose(np.vstack([lcois_iron, capexes_iron, fopexes_iron, vopexes_iron])), + index=casenames, + columns=columns, +) +print(df_iron) +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) diff --git a/examples/21_iron_mn_to_il/tech_config.yaml b/examples/21_iron_mn_to_il/tech_config.yaml index eca484274..266e12c8c 100644 --- a/examples/21_iron_mn_to_il/tech_config.yaml +++ b/examples/21_iron_mn_to_il/tech_config.yaml @@ -2,7 +2,7 @@ name: "technology_config" description: "This hybrid plant produces iron" technologies: - grid_feedstock: #electricity feedstock for iron ore + mine_electricity_feedstock: #electricity feedstock for iron ore performance_model: model: "feedstock_performance" cost_model: @@ -12,14 +12,14 @@ technologies: feedstock_type: "electricity" units: "MW" performance_parameters: - rated_capacity: 30. # MW, need 27.913 MW per timestep for iron ore + rated_capacity: 70. # MW, need 27.913 MW per timestep for iron ore cost_parameters: cost_year: 2022 - price: 58.02 #USD/MW + price: 0. # Electricity costs are already priced in to current mine model annual_cost: 0. start_up_cost: 0. - mine_feedstock: #iron ore feedstock + mine_crude_ore_feedstock: #iron ore feedstock performance_model: model: "feedstock_performance" cost_model: @@ -29,10 +29,10 @@ technologies: feedstock_type: "crude_ore" units: "t/h" performance_parameters: - rated_capacity: 2000. # need 828.50385048 t/h + rated_capacity: 2500. # need 828.50385048 t/h cost_parameters: cost_year: 2022 - price: 0.0 + price: 0. #USD/t annual_cost: 0. start_up_cost: 0. @@ -45,7 +45,25 @@ technologies: shared_parameters: mine: "Northshore" taconite_pellet_type: "drg" - max_ore_production_rate_tonnes_per_hr: 221.2592636 #516.0497610311598 + max_ore_production_rate_tonnes_per_hr: 500 + + + processed_ore_feedstock: #iron ore feedstock + performance_model: + model: "feedstock_performance" + cost_model: + model: "feedstock_cost" + model_inputs: + shared_parameters: + feedstock_type: "iron_ore" + units: "t/h" + performance_parameters: + rated_capacity: 250. # need 828.50385048 t/h + cost_parameters: + cost_year: 2022 + price: 0.0 + annual_cost: 0. + start_up_cost: 0. iron_transport: performance_model: @@ -90,7 +108,7 @@ technologies: rated_capacity: 40000. # need 38710.49649 galUS/h cost_parameters: cost_year: 2022 - price: 0.0016700004398318847 # cost is USD0.441167535/t, converted to USD/gal + price: 0.0016700004398318847 # cost is USD 0.441167535/t, converted to USD/gal annual_cost: 0. start_up_cost: 0. @@ -142,6 +160,7 @@ technologies: skilled_labor_cost: 40.85 #2022 USD/hr unskilled_labor_cost: 30.0 #2022 USD/hr + eaf_grid_feedstock: #electricity feedstock for EAF performance_model: model: "feedstock_performance" @@ -185,6 +204,8 @@ technologies: shared_parameters: feedstock_type: "natural_gas" units: "MMBtu" + feedstock_type: "natural_gas" + units: "MMBtu" performance_parameters: rated_capacity: 280. # need 276.5242929731515 MMBtu at each timestep cost_parameters: diff --git a/examples/21_iron_mn_to_il/tech_config_old.yaml b/examples/21_iron_mn_to_il/tech_config_old.yaml deleted file mode 100644 index afe79faf9..000000000 --- a/examples/21_iron_mn_to_il/tech_config_old.yaml +++ /dev/null @@ -1,67 +0,0 @@ -name: "technology_config" -description: "This hybrid plant produces iron" - -technologies: - iron_mine: - performance_model: - model: "iron_mine_performance" - cost_model: - model: "iron_mine_cost" - model_inputs: - shared_parameters: - mine: "Northshore" - taconite_pellet_type: "drg" - performance_parameters: - ore_cf_estimate: 0.9 - model_name: "martin_ore" - cost_parameters: - LCOE: 58.02 - LCOH: 7.10 - model_name: "martin_ore" - varom_model_name: "martin_ore" - installation_years: 3 - operational_year: 2035 - plant_life: 30 - gen_inflation: 0.025 - financial_assumptions: - total income tax rate: 0.2574 - capital gains tax rate: 0.15 - leverage after tax nominal discount rate: 0.10893 - debt equity ratio of initial financing: 0.624788 - debt interest rate: 0.050049 - iron_transport: - performance_model: - model: "iron_transport_performance" - cost_model: - model: "iron_transport_cost" - model_inputs: - performance_parameters: - find_closest_ship_site: False - shipment_site: "Chicago" - cost_parameters: - transport_year: 2022 - cost_year: 2022 - iron_plant: - performance_model: - model: "iron_plant_performance" - cost_model: - model: "iron_plant_cost" - model_inputs: - shared_parameters: - winning_type: "ng" - iron_win_capacity: 1418095 - site_name: "IL" - performance_parameters: - win_capacity_demon: "iron" - model_name: "rosner" - cost_parameters: - LCOE: 58.02 - LCOH: 7.10 - LCOI_ore: 0 #125.25996463784443 - iron_transport_cost: 30.566808424134745 - ore_profit_pct: 6.0 - varom_model_name: "rosner" - installation_years: 3 - operational_year: 2035 - -# baseline 843.37604007 diff --git a/examples/21_iron_mn_to_il/test_inputs.csv b/examples/21_iron_mn_to_il/test_inputs.csv index 66387f458..c51fadc41 100644 --- a/examples/21_iron_mn_to_il/test_inputs.csv +++ b/examples/21_iron_mn_to_il/test_inputs.csv @@ -1,3 +1,4 @@ -Index 0,Index 1,Index 2,Index 3,Index 4,Type,Case 1,Case 2,Case 3,Case 4, -technologies,iron_mine,model_inputs,shared_parameters,mine,str,Northshore,Hibbing,Northshore,Hibbing, -technologies,iron_mine,model_inputs,shared_parameters,taconite_pellet_type,str,std,std,drg,drg, +Index 0,Index 1,Index 2,Index 3,Index 4,Type,Standard Iron - Hibbing,Standard Iron - Northshore,DR Grade Iron - Northshore,DR Grade Iron - Northshore (adjusted) +technologies,iron_mine,model_inputs,shared_parameters,mine,str,Hibbing,Northshore,Northshore,Northshore +technologies,iron_mine,model_inputs,shared_parameters,taconite_pellet_type,str,std,std,drg,drg +technologies,processed_ore_feedstock,model_inputs,performance_parameters,rated_capacity,float,250,250,250,221.2592636 diff --git a/examples/test/test_all_examples.py b/examples/test/test_all_examples.py index 8141b5497..cfbb59a66 100644 --- a/examples/test/test_all_examples.py +++ b/examples/test/test_all_examples.py @@ -1784,15 +1784,15 @@ def test_21_iron_dri_eaf_example(subtests): with subtests.test("Value check on LCOI"): lcoi = h2i.model.get_val("finance_subgroup_iron_ore.LCOI", units="USD/t")[0] - assert pytest.approx(lcoi, rel=1e-4) == 143.3495266638054 + assert pytest.approx(lcoi, rel=1e-4) == 135.3741358811098 with subtests.test("Value check on LCOP"): lcop = h2i.model.get_val("finance_subgroup_pig_iron.LCOP", units="USD/t")[0] - assert pytest.approx(lcop, rel=1e-4) == 353.99805215243265 + assert pytest.approx(lcop, rel=1e-4) == 359.670379351 with subtests.test("Value check on LCOS"): lcos = h2i.model.get_val("finance_subgroup_steel.LCOS", units="USD/t")[0] - assert pytest.approx(lcos, rel=1e-4) == 524.8228189073025 + assert pytest.approx(lcos, rel=1e-4) == 531.5842266865 def test_sweeping_different_resource_sites_doe(subtests): diff --git a/h2integrate/core/feedstocks.py b/h2integrate/core/feedstocks.py index a0d133940..ce8d296a8 100644 --- a/h2integrate/core/feedstocks.py +++ b/h2integrate/core/feedstocks.py @@ -32,16 +32,23 @@ def setup(self): self.config = FeedstockPerformanceConfig.from_dict( merge_shared_inputs(self.options["tech_config"]["model_inputs"], "performance") ) - n_timesteps = self.options["plant_config"]["plant"]["simulation"]["n_timesteps"] - feedstock_type = self.config.feedstock_type + self.n_timesteps = self.options["plant_config"]["plant"]["simulation"]["n_timesteps"] + self.add_input( + f"{self.config.feedstock_type}_capacity", + val=self.config.rated_capacity, + units=self.config.units, + ) - self.add_output(f"{feedstock_type}_out", shape=n_timesteps, units=self.config.units) + self.add_output( + f"{self.config.feedstock_type}_out", shape=self.n_timesteps, units=self.config.units + ) def compute(self, inputs, outputs): - feedstock_type = self.config.feedstock_type - n_timesteps = self.options["plant_config"]["plant"]["simulation"]["n_timesteps"] + self.options["plant_config"]["plant"]["simulation"]["n_timesteps"] # Generate feedstock array operating at full capacity for the full year - outputs[f"{feedstock_type}_out"] = np.full(n_timesteps, self.config.rated_capacity) + outputs[f"{self.config.feedstock_type}_out"] = np.full( + self.n_timesteps, inputs[f"{self.config.feedstock_type}_capacity"][0] + ) @define(kw_only=True) @@ -84,10 +91,16 @@ def setup(self): units=self.config.units, desc=f"Consumption profile of {feedstock_type}", ) + self.add_input( + "price", + val=self.config.price, + units="USD/(" + self.config.units + ")/h", + desc=f"Consumption profile of {feedstock_type}", + ) def compute(self, inputs, outputs, discrete_inputs, discrete_outputs): feedstock_type = self.config.feedstock_type - price = self.config.price + price = inputs["price"] hourly_consumption = inputs[f"{feedstock_type}_consumed"] cost_per_year = sum(price * hourly_consumption)