Skip to content

Commit

Permalink
rename derivate to derivative
Browse files Browse the repository at this point in the history
Fixes #274
  • Loading branch information
joAschauer committed Jun 17, 2024
1 parent fe1b9e4 commit f5c40ed
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 33 deletions.
10 changes: 7 additions & 3 deletions app/plot_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def agora_discrete_colors_cost_categories() -> dict:
"Electrolysis",
"Electricity generation",
"Electricity and H2 storage",
"Derivate production",
"Derivative production",
"Heat",
"Carbon",
# TODO: add missing category (GH #145)
Expand Down Expand Up @@ -652,7 +652,7 @@ def transform_time_series(
"WIND-ON": "Wind onshore",
"WIND-OFF": "Wind offshore",
"ELY": "Electrolyzer",
"DERIV": "Derivate production",
"DERIV": "Derivative production",
"H2_STR_in": "H2 storage",
"H2_STR_store": "H2 storage",
"final_product_storage": "Final product storage",
Expand Down Expand Up @@ -705,7 +705,11 @@ def create_profile_figure_generation(df_sel: pd.DataFrame) -> go.Figure:
df_sel, fig, component="Electrolyzer", parameter="Power", color="#0C0C0C"
)
add_trace_to_figure(
df_sel, fig, component="Derivate production", parameter="Power", color="#408B2E"
df_sel,
fig,
component="Derivative production",
parameter="Power",
color="#408B2E",
)

add_vertical_lines(fig)
Expand Down
2 changes: 1 addition & 1 deletion app/ptxboa_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def sort_cost_type_columns_by_position_in_chain(df):
"Electricity generation",
"Electrolysis",
"Electricity and H2 storage",
"Derivate production",
"Derivative production",
"Heat",
"Water",
"Carbon",
Expand Down
2 changes: 1 addition & 1 deletion app/tab_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def content_info():
"General",
"Electricity generation",
"Electrolysis",
"Derivate production",
"Derivative production",
"Transport",
],
horizontal=True,
Expand Down
2 changes: 1 addition & 1 deletion app/tab_input_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def content_input_data(api: PtxboaAPI) -> None:
scope=None,
key="input_data_electricity_generation",
)
with st.expander("**Electrolysis and derivate production**"):
with st.expander("**Electrolysis and derivative production**"):
st.caption(
(
"The unit of CAPEX and OPEX (fix) is USD/t for Green iron "
Expand Down
6 changes: 3 additions & 3 deletions app/tab_optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def calc_aggregate_statistics(
"WIND-ON": "Wind onshore",
"WIND-OFF": "Wind offshore",
"ELY": "Electrolyzer",
"DERIV": "Derivate production",
"DERIV": "Derivative production",
"H2_STR_in": "H2 storage",
"EL_STR": "Electricity storage",
"CO2-G_supply": "CO2 supply",
Expand Down Expand Up @@ -212,7 +212,7 @@ def calc_aggregate_statistics(
"Wind onshore",
"Wind offshore",
"Electrolyzer",
"Derivate production",
"Derivative production",
"Electricity storage",
"H2 storage",
]
Expand All @@ -231,7 +231,7 @@ def calc_aggregate_statistics(

for i in [
"Electrolyzer",
"Derivate production",
"Derivative production",
]:
if i in res.index:
res.at[i, "Curtailment (%)"] = np.nan
Expand Down
4 changes: 2 additions & 2 deletions md/helptext_columns_carbon_dioxide.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Carbon dioxide is required by some derivate production processes. In the sidebar, you can which carbon source to use.
Carbon dioxide is required by some derivative production processes. In the sidebar, you can which carbon source to use.

The tool currently only accounts for carbon consumption in derivate production. It does not take into account carbon emissions along the process chain.
The tool currently only accounts for carbon consumption in derivative production. It does not take into account carbon emissions along the process chain.

**Unit:** kg CO₂ per main output
2 changes: 1 addition & 1 deletion md/helptext_columns_nitrogen.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Nitrogen is required by some derivate production processes.
Nitrogen is required by some derivative production processes.
2 changes: 1 addition & 1 deletion md/info_optimization_results.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This table shows aggregated results of the optimization:

- the installed generation, electrolyzer and derivate production capacities and their annual output that are required to produce 8760 MWh of final product per year
- the installed generation, electrolyzer and derivative production capacities and their annual output that are required to produce 8760 MWh of final product per year
- the realized full load hours of said components
- the curtailment of renewable generation
- the costs per MWh of final product.
Expand Down
2 changes: 1 addition & 1 deletion md/whatisthis_optimization.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
##### Results of the optimization model

We use an optimization model to determine the capacities and full load hours of generators, electrolyzers, derivate production facilitites and storage. The model calculates capacities and hourly dispatch for eight representative weeks while minimizing total costs. PyPSA is used for modeling. The tsam package is used for temporal aggregation.
We use an optimization model to determine the capacities and full load hours of generators, electrolyzers, derivative production facilitites and storage. The model calculates capacities and hourly dispatch for eight representative weeks while minimizing total costs. PyPSA is used for modeling. The tsam package is used for temporal aggregation.

Model runs are pre-calculated for all default settings. If you modify the input data in **Data editing mode**, a live recalculation is triggered for the settings you selected in the sidebar. For all other cost calculations that are shown in the cost comparison graphs, the modified data is used to calculate the costs, but we use the full load hours from the default scenario to cut down computational costs.

Expand Down
4 changes: 2 additions & 2 deletions ptxboa/static/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@

ResultClassType = Literal[
"Carbon",
"Derivate production",
"Derivative production",
"Electricity and H2 storage",
"Electricity generation",
"Electrolysis",
Expand All @@ -698,7 +698,7 @@
]
ResultClassValues = [
"Carbon",
"Derivate production",
"Derivative production",
"Electricity and H2 storage",
"Electricity generation",
"Electrolysis",
Expand Down
10 changes: 5 additions & 5 deletions ptxboa/static/dim_process.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ATR,Autothermal-Reactor (Blue Hydrogen),H2-G,CH4-G,True,False,True,False,TRNSP-P
CH3OHREC,Methanol reconversion,H2-G,CH3OH-L,True,False,True,False,TRNSP-SP,False,False,Transportation (Ship),
CH3OH-S,Methanol ship (own fuel consumption),CH3OH-L,CH3OH-L,False,False,True,False,TRNSP-S,False,False,Transportation (Ship),
CH3OH-SB,Methanol ship (bunker fuel consumption),CH3OH-L,CH3OH-L,False,False,True,False,TRNSP-S,False,False,Transportation (Ship),BFUEL-L
CH3OHSYN,Methanol Synthesis,CH3OH-L,H2-G,True,False,False,False,DERIV,False,True,Derivate production,CO2-G/EL
CH3OHSYN,Methanol Synthesis,CH3OH-L,H2-G,True,False,False,False,DERIV,False,True,Derivative production,CO2-G/EL
CH4-COMP,Methane compression,CH4-G,CH4-G,True,False,True,False,TRNSP-PP,False,False,Transportation (Pipeline),EL
CH4-LIQ,Methane Liquefaction,CH4-L,CH4-G,True,False,True,False,TRNSP-SP,False,False,Transportation (Ship),EL
CH4-P-L,Methane land pipeline new,CH4-G,CH4-G,False,False,True,False,TRNSP-P,False,False,Transportation (Pipeline),
Expand All @@ -14,13 +14,13 @@ CH4-P-SR,Methane sea pipeline retrofitted,CH4-G,CH4-G,False,False,True,False,TRN
CH4-RGAS,Methane Regasification,CH4-G,CH4-L,True,False,True,False,TRNSP-SP,False,False,Transportation (Ship),
CH4-S,LNG ship (own fuel consumption),CH4-L,CH4-L,False,False,True,False,TRNSP-S,False,False,Transportation (Ship),
CH4-SB,LNG ship (bunker fuel consumption),CH4-L,CH4-L,False,False,True,False,TRNSP-S,False,False,Transportation (Ship),BFUEL-L
CH4SYN,Methane Synthesis,CH4-G,H2-G,True,False,False,False,DERIV,False,True,Derivate production,CO2-G/H2O-L/HEAT
CH4SYN,Methane Synthesis,CH4-G,H2-G,True,False,False,False,DERIV,False,True,Derivative production,CO2-G/H2O-L/HEAT
DAC,Direct Air Capture,CO2-G,,False,False,False,True,PROV_C,False,False,Carbon,EL/H2O-L/HEAT
DESAL,Sea Water desalination,H2O-L,,False,False,False,True,PROV_H2O,False,False,Water,EL
DRI,Green iron reduction,DRI-S,H2-G,True,False,False,False,DERIV,False,True,Derivate production,EL
DRI,Green iron reduction,DRI-S,H2-G,True,False,False,False,DERIV,False,True,Derivative production,EL
DRI-S,Green iron ship,DRI-S,DRI-S,False,False,True,False,TRNSP-S,False,False,Transportation (Ship),
DRI-SB,Green iron ship (bunker fuel consumption),DRI-S,DRI-S,False,False,True,False,TRNSP-S,False,False,Transportation (Ship),
EFUELSYN,FT e-fuels Synthesis (Fischer-Tropsch),CHX-L,H2-G,True,False,False,False,DERIV,False,True,Derivate production,CO2-G/EL/H2O-L/HEAT
EFUELSYN,FT e-fuels Synthesis (Fischer-Tropsch),CHX-L,H2-G,True,False,False,False,DERIV,False,True,Derivative production,CO2-G/EL/H2O-L/HEAT
EL-STR,electricity storage,EL,EL,False,False,True,False,STORE,False,False,Electricity and H2 storage,
EL-TRANS,electricity transmission,EL,EL,False,False,True,False,TRNSP-E,False,False,Electricity generation,
H2-COMP,Hydrogen compression,H2-G,H2-G,True,False,True,False,TRNSP-PP,False,False,Transportation (Pipeline),EL
Expand All @@ -40,7 +40,7 @@ LOHC-SB,LOHC ship (bunker fuel consumption),LOHC-L,LOHC-L,False,False,True,False
NH3-REC,Ammonia reconversion,H2-G,NH3-L,True,False,True,False,TRNSP-SP,False,False,Transportation (Ship),EL
NH3-S,Ammonia ship (own fuel consumption),NH3-L,NH3-L,False,False,True,False,TRNSP-S,False,False,Transportation (Ship),
NH3-SB,Ammonia ship (bunker fuel consumption),NH3-L,NH3-L,False,False,True,False,TRNSP-S,False,False,Transportation (Ship),BFUEL-L
NH3SYN,Ammonia Synthesis (Haber-Bosch),NH3-L,H2-G,True,False,False,False,DERIV,False,True,Derivate production,EL/N2-G
NH3SYN,Ammonia Synthesis (Haber-Bosch),NH3-L,H2-G,True,False,False,False,DERIV,False,True,Derivative production,EL/N2-G
PEM-EL,PEM electrolysis,H2-G,EL,True,False,False,False,ELY,True,False,Electrolysis,H2O-L
PV-FIX,PV tilted,EL,,False,True,False,False,RE-GEN,False,False,Electricity generation,
PV-TRK,PV tracking,EL,,False,True,False,False,RE-GEN,False,False,Electricity generation,
Expand Down
2 changes: 1 addition & 1 deletion scripts/costs_optimized_vs_not_optimized.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def cli(out_file: Path, cache_dir: Path, loglevel) -> None:
region="all",
chain="all",
process_type_filter=[
"Derivate production",
"Derivative production",
"Electricity and H2 storage",
"Electricity generation",
"Electrolysis",
Expand Down
22 changes: 11 additions & 11 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ def test_example_api_call_1_ship(self):
("Carbon", "CAPEX"): 196.81657679863747,
("Carbon", "OPEX"): 113.57351510254443,
("Carbon", "FLOW"): 100.57397108324335,
("Derivate production", "CAPEX"): 90.50895668682817,
("Derivate production", "OPEX"): 39.171320804334,
("Derivative production", "CAPEX"): 90.50895668682817,
("Derivative production", "OPEX"): 39.171320804334,
("Heat", "FLOW"): 277.3302192660863,
# ("Electricity and H2 storage", "OPEX"): 176.3817106548646,
# TODO: test data not up to date
Expand Down Expand Up @@ -143,9 +143,9 @@ def test_example_api_call_2_ship_own_fuel(self):
("Electricity generation", "OPEX"): 146.78305821183,
("Transportation (Ship)", "OPEX"): 12.2061245592688,
("Carbon", "FLOW"): 61.3694736856213,
("Derivate production", "CAPEX"): 188.2042202083766,
("Derivate production", "OPEX"): 37.0003810701601,
("Derivate production", "FLOW"): 16.8369286421993,
("Derivative production", "CAPEX"): 188.2042202083766,
("Derivative production", "OPEX"): 37.0003810701601,
("Derivative production", "FLOW"): 16.8369286421993,
# ("Electricity and H2 storage", "OPEX"): 40.72566174247268,
# TODO: test data not up to date
}
Expand Down Expand Up @@ -190,9 +190,9 @@ def test_example_api_call_3_pipeline_sea_land(self):
("Carbon", "CAPEX"): 0,
("Carbon", "OPEX"): 0,
("Carbon", "FLOW"): 0,
("Derivate production", "CAPEX"): 0,
("Derivate production", "OPEX"): 0,
("Derivate production", "FLOW"): 0,
("Derivative production", "CAPEX"): 0,
("Derivative production", "OPEX"): 0,
("Derivative production", "FLOW"): 0,
("Heat", "CAPEX"): 0,
("Heat", "OPEX"): 0,
("Heat", "FLOW"): 0,
Expand Down Expand Up @@ -238,9 +238,9 @@ def test_example_api_call_4_pipeline_retrofitted(self):
("Carbon", "CAPEX"): 0,
("Carbon", "OPEX"): 0,
("Carbon", "FLOW"): 0,
("Derivate production", "CAPEX"): 0,
("Derivate production", "OPEX"): 0,
("Derivate production", "FLOW"): 0,
("Derivative production", "CAPEX"): 0,
("Derivative production", "OPEX"): 0,
("Derivative production", "FLOW"): 0,
("Heat", "CAPEX"): 0,
("Heat", "OPEX"): 0,
("Heat", "FLOW"): 0,
Expand Down

0 comments on commit f5c40ed

Please sign in to comment.