Skip to content

Commit be171f6

Browse files
committed
remove unused code
1 parent 2d7d3ea commit be171f6

File tree

2 files changed

+1
-217
lines changed

2 files changed

+1
-217
lines changed

config/test/config.dach.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ run:
99

1010
scenario:
1111
clusters:
12-
- 5 #current options: 27, 49
12+
- 5
1313
countries: ['DE', 'AT', 'CH']
1414

1515
snapshots:

scripts/pypsa-de/export_ariadne_variables.py

Lines changed: 0 additions & 216 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@
2222
# Defining global variables
2323

2424
TWh2PJ = 3.6
25-
MWh2TJ = 3.6e-3
2625
MW2GW = 1e-3
2726
MW2TW = 1e-6
2827
t2Mt = 1e-6
2928

3029
MWh2GJ = 3.6
31-
TWh2PJ = 3.6
3230
MWh2PJ = 3.6e-6
3331
toe_to_MWh = 11.630 # GWh/ktoe OR MWh/toe
3432

@@ -4660,219 +4658,6 @@ def get_production(region, year):
46604658
return var
46614659

46624660

4663-
def get_operational_and_capital_costs(year):
4664-
"""
4665-
' This function reads in the cost data from the costs.csv file and brings
4666-
it into the database format.
4667-
"""
4668-
var = pd.Series()
4669-
ind = planning_horizons.index(year)
4670-
costs = load_costs(
4671-
snakemake.input.costs[ind],
4672-
snakemake.params.costs,
4673-
snakemake.params.max_hours,
4674-
nyears=1,
4675-
)
4676-
4677-
costs_dict = {
4678-
# capacities electricity
4679-
"BEV charger": None,
4680-
"CCGT": "CCGT",
4681-
"DAC": "direct air capture",
4682-
"H2 Electrolysis": "electrolysis",
4683-
"H2 Fuel Cell": "fuel cell",
4684-
"OCGT": "OCGT",
4685-
"PHS": "PHS",
4686-
"V2G": None,
4687-
"battery charger": "battery inverter",
4688-
"battery discharger": "battery inverter",
4689-
"coal": "coal",
4690-
"gas pipeline": "CH4 (g) pipeline",
4691-
"home battery charger": "home battery inverter",
4692-
"home battery discharger": "home battery inverter",
4693-
"hydro": "hydro",
4694-
"lignite": "lignite",
4695-
"methanolisation": "methanolisation",
4696-
"offwind-ac": "offwind", # TODO add grid connection cost
4697-
"offwind-dc": "offwind", # TODO add grid connection cost
4698-
"offwind-float": "offwind-float", # TODO add grid connection cost
4699-
"oil": "oil",
4700-
"onwind": "onwind",
4701-
"ror": "ror",
4702-
"rural air heat pump": "decentral air-sourced heat pump",
4703-
"rural ground heat pump": "decentral ground-sourced heat pump",
4704-
"rural resistive heater": "decentral resistive heater",
4705-
"rural solar thermal": "decentral solar thermal",
4706-
"solar": "solar-utility",
4707-
"solar rooftop": "solar-rooftop",
4708-
"solar-hsat": "solar-utility single-axis tracking",
4709-
"solid biomass": "central solid biomass CHP",
4710-
"urban central air heat pump": "central air-sourced heat pump",
4711-
"urban central coal CHP": "central coal CHP",
4712-
"urban central gas CHP": "central gas CHP",
4713-
"urban central gas CHP CC": "central gas CHP",
4714-
"urban central lignite CHP": "central coal CHP",
4715-
"urban central oil CHP": "central gas CHP",
4716-
"urban central resistive heater": "central resistive heater",
4717-
"urban central solar thermal": "central solar thermal",
4718-
"urban central solid biomass CHP": "central solid biomass CHP",
4719-
"urban central solid biomass CHP CC": "central solid biomass CHP CC",
4720-
"urban decentral air heat pump": "decentral air-sourced heat pump",
4721-
"urban decentral resistive heater": "decentral resistive heater",
4722-
"urban decentral solar thermal": "decentral solar thermal",
4723-
"waste CHP": "waste CHP",
4724-
"waste CHP CC": "waste CHP CC",
4725-
# Heat capacities
4726-
# TODO Check the units of the investments
4727-
"Fischer-Tropsch": None, #'Fischer-Tropsch' * "efficiency" ,
4728-
"Sabatier": "methanation",
4729-
# 'urban central air heat pump': 'central air-sourced heat pump',
4730-
# 'urban central coal CHP': 'central coal CHP',
4731-
# 'urban central gas CHP': 'central gas CHP',
4732-
# 'urban central gas CHP CC': 'central gas CHP',
4733-
# 'urban central lignite CHP': 'central coal CHP',
4734-
# 'urban central oil CHP': 'central gas CHP',
4735-
# 'urban central resistive heater': 'central resistive heater',
4736-
# 'urban central solid biomass CHP': 'central solid biomass CHP',
4737-
# 'urban central solid biomass CHP CC': 'central solid biomass CHP CC',
4738-
"urban central water tanks charger": "water tank charger",
4739-
"urban central water tanks discharger": "water tank discharger",
4740-
# 'waste CHP': 'waste CHP',
4741-
# 'waste CHP CC': 'waste CHP CC',
4742-
# Decentral Heat capacities
4743-
# TODO consider overdim_factor
4744-
#'rural air heat pump': None,
4745-
"rural biomass boiler": "biomass boiler",
4746-
"rural gas boiler": "decentral gas boiler",
4747-
#'rural ground heat pump': None,
4748-
"rural oil boiler": "decentral oil boiler",
4749-
"rural water tanks charger": "water tank charger",
4750-
"rural water tanks discharger": "water tank discharger",
4751-
#'urban decentral air heat pump': None,
4752-
"urban decentral biomass boiler": "biomass boiler",
4753-
"urban decentral gas boiler": "decentral gas boiler",
4754-
"urban decentral oil boiler": "decentral oil boiler",
4755-
"urban decentral water tanks charger": "water tank charger",
4756-
"urban decentral water tanks discharger": "water tank discharger",
4757-
# Other capacities
4758-
# 'Sabatier': 'methanation',costs.at["methanation", "capital_cost"]
4759-
# * costs.at["methanation", "efficiency"]
4760-
"biogas to gas": None, # TODO biogas + biogas upgrading
4761-
"biogas to gas CC": None, # TODO costs.at["biogas CC", "capital_cost"]
4762-
# + costs.at["biogas upgrading", "capital_cost"]
4763-
# + costs.at["biomass CHP capture", "capital_cost"]
4764-
# * costs.at["biogas CC", "CO2 stored"],
4765-
}
4766-
4767-
# storage_costs_dict = {
4768-
# "H2": "hydrogen storage underground",
4769-
# "EV battery": None, # 0 i think
4770-
# "PHS": None, #'PHS', accounted already as generator??
4771-
# "battery": "battery storage",
4772-
# "biogas": None, # not a typical store, 0 i think
4773-
# "co2 sequestered": snakemake.params.co2_sequestration_cost,
4774-
# "co2 stored": "CO2 storage tank",
4775-
# "gas": "gas storage",
4776-
# "home battery": "home battery storage",
4777-
# "hydro": None, # `hydro`, , accounted already as generator??
4778-
# "oil": 0.02,
4779-
# "rural water tanks": "decentral water tank storage",
4780-
# "solid biomass": None, # not a store, but a potential, 0 i think
4781-
# "urban central water tanks": "central water tank storage",
4782-
# "urban decentral water tanks": "decentral water tank storage",
4783-
# }
4784-
4785-
sector_dict = {
4786-
"BEV charger": "Electricity",
4787-
"CCGT": "Electricity",
4788-
"DAC": "Gases",
4789-
"H2 Electrolysis": "Hydrogen",
4790-
"H2 Fuel Cell": "Electricity",
4791-
"OCGT": "Electricity",
4792-
"PHS": "Electricity",
4793-
"V2G": "Electricity",
4794-
"battery charger": "Electricity",
4795-
"battery discharger": "Electricity",
4796-
"coal": "Electricity",
4797-
"Fischer-Tropsch": "Liquids",
4798-
"gas pipeline": "Gases",
4799-
"home battery charger": "Electricity",
4800-
"home battery discharger": "Electricity",
4801-
"hydro": "Electricity",
4802-
"lignite": "Electricity",
4803-
"methanolisation": "Liquids",
4804-
"offwind-ac": "Electricity",
4805-
"offwind-dc": "Electricity",
4806-
"offwind-float": "Electricity",
4807-
"oil": "Electricity",
4808-
"onwind": "Electricity",
4809-
"ror": "Electricity",
4810-
"rural air heat pump": "Heat",
4811-
"rural biomass boiler": "Heat",
4812-
"rural gas boiler": "Heat",
4813-
"rural oil boiler": "Heat",
4814-
"rural ground heat pump": "Heat",
4815-
"rural resistive heater": "Heat",
4816-
"rural solar thermal": "Heat",
4817-
"rural water tanks charger": "Heat",
4818-
"rural water tanks discharger": "Heat",
4819-
"Sabatier": "Gases",
4820-
"solar": "Electricity",
4821-
"solar rooftop": "Electricity",
4822-
"solar-hsat": "Electricity",
4823-
"solid biomass": "Heat",
4824-
"urban central air heat pump": "Heat",
4825-
"urban central coal CHP": "Heat",
4826-
"urban central gas CHP": "Heat",
4827-
"urban central gas CHP CC": "Heat",
4828-
"urban central lignite CHP": "Heat",
4829-
"urban central oil CHP": "Heat",
4830-
"urban central water tanks charger": "Heat",
4831-
"urban central water tanks discharger": "Heat",
4832-
"urban central resistive heater": "Heat",
4833-
"urban central solar thermal": "Heat",
4834-
"urban central solid biomass CHP": "Heat",
4835-
"urban central solid biomass CHP CC": "Heat",
4836-
"urban decentral air heat pump": "Heat",
4837-
"urban decentral resistive heater": "Heat",
4838-
"urban decentral solar thermal": "Heat",
4839-
"urban decentral biomass boiler": "Heat",
4840-
"urban decentral gas boiler": "Heat",
4841-
"urban decentral oil boiler": "Heat",
4842-
"urban decentral water tanks charger": "Heat",
4843-
"urban decentral water tanks discharger": "Heat",
4844-
"waste CHP": "Heat",
4845-
"waste CHP CC": "Heat",
4846-
}
4847-
4848-
grid_connection = [
4849-
"offwind-ac",
4850-
"offwind-dc",
4851-
"offwind-float",
4852-
"solar",
4853-
"solar-hsat",
4854-
]
4855-
4856-
for key, tech in costs_dict.items():
4857-
if tech is None:
4858-
continue
4859-
sector = sector_dict[key]
4860-
4861-
FOM = "OM Cost|Fixed" + "|" + sector + "|" + tech
4862-
VOM = "OM Cost|Variable" + "|" + sector + "|" + tech
4863-
capital = "Capital Cost" + "|" + sector + "|" + tech
4864-
4865-
var[FOM] = costs.at[tech, "capital_cost"] / 1e3 # EUR/MW -> EUR/kW
4866-
var[VOM] = costs.at[tech, "VOM"] / MWh2GJ # EUR/MWh -> EUR/GJ
4867-
var[capital] = costs.at[tech, "investment"] / 1e3 # EUR/MW -> EUR/kW
4868-
4869-
if key in grid_connection:
4870-
var[FOM] += costs.at["electricity grid connection", "capital_cost"] / 1e3
4871-
var[capital] += costs.at["electricity grid connection", "investment"] / 1e3
4872-
4873-
return var
4874-
4875-
48764661
def get_grid_capacity(n, region, year):
48774662
var = pd.Series()
48784663
### Total Capacity
@@ -5299,7 +5084,6 @@ def get_ariadne_var(
52995084
get_emissions(n, region, energy_totals, industry_demand),
53005085
get_policy(n, year),
53015086
get_trade(n, region),
5302-
# get_operational_and_capital_costs(year),
53035087
get_economy(n, region),
53045088
get_system_cost(n, region),
53055089
]

0 commit comments

Comments
 (0)