Passed
Pull Request — dev (#1255)
by
unknown
02:57
created

data.datasets.scenario_parameters.parameters   A

Complexity

Total Complexity 31

Size/Duplication

Total Lines 876
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 31
eloc 521
dl 0
loc 876
rs 9.92
c 0
b 0
f 0
1
"""The module containing all parameters for the scenario table
2
"""
3
4
import pandas as pd
5
6
import egon.data.config
7
8
9
def read_csv(year):
10
    source = egon.data.config.datasets()["pypsa-technology-data"]["targets"][
11
        "data_dir"
12
    ]
13
14
    return pd.read_csv(f"{source}costs_{year}.csv")
15
16
17
def read_costs(df, technology, parameter, value_only=True):
18
    result = df.loc[
19
        (df.technology == technology) & (df.parameter == parameter)
20
    ].squeeze()
21
22
    # Rescale costs to EUR/MW
23
    if "EUR/kW" in result.unit:
24
        result.value *= 1e3
25
        result.unit = result.unit.replace("kW", "MW")
26
27
    if value_only:
28
        return result.value
29
    else:
30
        return result
31
32
33
def annualize_capital_costs(overnight_costs, lifetime, p):
34
    """
35
36
    Parameters
37
    ----------
38
    overnight_costs : float
39
        Overnight investment costs in EUR/MW or EUR/MW/km
40
    lifetime : int
41
        Number of years in which payments will be made
42
    p : float
43
        Interest rate in p.u.
44
45
    Returns
46
    -------
47
    float
48
        Annualized capital costs in EUR/MW/a or EUR/MW/km/a
49
50
    """
51
52
    # Calculate present value of an annuity (PVA)
53
    PVA = (1 / p) - (1 / (p * (1 + p) ** lifetime))
54
55
    return overnight_costs / PVA
56
57
58
def global_settings(scenario):
59
    """Returns global paramaters for the selected scenario.
60
61
    Parameters
62
    ----------
63
    scenario : str
64
        Name of the scenario.
65
66
    Returns
67
    -------
68
    parameters : dict
69
        List of global parameters
70
71
    """
72
73
    if scenario == "eGon2035":
74
        parameters = {
75
            "weather_year": 2011,
76
            "population_year": 2035,
77
            "fuel_costs": {  # Netzentwicklungsplan Strom 2035, Version 2021, 1. Entwurf, p. 39, table 6
78
                "oil": 73.8,  # [EUR/MWh]
79
                "gas": 25.6,  # [EUR/MWh]
80
                "coal": 20.2,  # [EUR/MWh]
81
                "lignite": 4.0,  # [EUR/MWh]
82
                "nuclear": 1.7,  # [EUR/MWh]
83
                "biomass": 40,  # Dummyvalue, ToDo: Find a suitable source
84
            },
85
            "co2_costs": 76.5,  # [EUR/t_CO2]
86
            "co2_emissions": {  # Netzentwicklungsplan Strom 2035, Version 2021, 1. Entwurf, p. 40, table 8
87
                "waste": 0.165,  # [t_CO2/MW_th]
88
                "lignite": 0.393,  # [t_CO2/MW_th]
89
                "gas": 0.201,  # [t_CO2/MW_th]
90
                "nuclear": 0.0,  # [t_CO2/MW_th]
91
                "oil": 0.288,  # [t_CO2/MW_th]
92
                "coal": 0.335,  # [t_CO2/MW_th]
93
                "other_non_renewable": 0.268,  # [t_CO2/MW_th]
94
            },
95
            "interest_rate": 0.05,  # [p.u.]
96
        }
97
98
    elif scenario == "eGon100RE":
99
        parameters = {
100
            "weather_year": 2011,
101
            "population_year": 2050,
102
            "fuel_costs": {  # Netzentwicklungsplan Strom 2035, Version 2021, 1. Entwurf, p. 39, table 6
103
                "oil": 73.8,  # [EUR/MWh]
104
                "gas": 25.6,  # [EUR/MWh]
105
                "coal": 20.2,  # [EUR/MWh]
106
                "lignite": 4.0,  # [EUR/MWh]
107
                "nuclear": 1.7,  # [EUR/MWh]
108
            },
109
            "co2_costs": 76.5,  # [EUR/t_CO2]
110
            "co2_emissions": {  # Netzentwicklungsplan Strom 2035, Version 2021, 1. Entwurf, p. 40, table 8
111
                "waste": 0.165,  # [t_CO2/MW_th]
112
                "lignite": 0.393,  # [t_CO2/MW_th]
113
                "gas": 0.201,  # [t_CO2/MW_th]
114
                "nuclear": 0.0,  # [t_CO2/MW_th]
115
                "oil": 0.288,  # [t_CO2/MW_th]
116
                "coal": 0.335,  # [t_CO2/MW_th]
117
                "other_non_renewable": 0.268,  # [t_CO2/MW_th]
118
            },
119
            "interest_rate": 0.05,  # [p.u.]
120
        }
121
122
    elif scenario == "eGon2021":
123
        parameters = {
124
            "weather_year": 2011,
125
            "population_year": 2021,
126
        }
127
128
    elif scenario == "status2023":
129
        parameters = {
130
            "weather_year": 2023,
131
            "population_year": 2019,  # TODO: check if possible for 2023
132
            "fuel_costs": {
133
                # TYNDP 2020, data for 2023 (https://2020.entsos-tyndp-scenarios.eu/fuel-commodities-and-carbon-prices/)
134
                "oil": 16.4 * 3.6,  # [EUR/MWh]
135
                "gas": 6.1 * 3.6,  # [EUR/MWh]
136
                "coal": 3.4 * 3.6,  # [EUR/MWh]
137
                "lignite": 1.1 * 3.6,  # [EUR/MWh]
138
                "nuclear": 0.47 * 3.6,  # [EUR/MWh]
139
                "biomass": read_costs(read_csv(2020), "biomass", "fuel"),
140
            },
141
            "co2_costs": 83.66,  # [EUR/t_CO2], source:
142
            # https://www.iwr.de/news/co2-emissionshandel-deutschland-erzielt-2023-rekordeinnahmen-von-ueber-18-mrd-euro-news38528
143
            "co2_emissions": {
144
                # Netzentwicklungsplan Strom 2037, Genehmigtr Scenariorahmen, p. 66, table 21
145
                # https://www.netzentwicklungsplan.de/sites/default/files/2023-01/Szenariorahmen_2037_Genehmigung.pdf
146
                "waste": 0.165,  # [t_CO2/MW_th]
147
                "lignite": 0.393,  # [t_CO2/MW_th]
148
                "gas": 0.201,  # [t_CO2/MW_th]
149
                "nuclear": 0.0,  # [t_CO2/MW_th]
150
                "oil": 0.288,  # [t_CO2/MW_th]
151
                "coal": 0.337,  # [t_CO2/MW_th]
152
                "other_non_renewable": 0.268,  # [t_CO2/MW_th]
153
            },
154
            "interest_rate": 0.05,  # [p.u.]
155
        }
156
157
    elif scenario == "status2019":
158
        parameters = {
159
            "weather_year": 2011,
160
            "population_year": 2019,
161
            "fuel_costs": {  # TYNDP 2020, data for 2020 (https://2020.entsos-tyndp-scenarios.eu/fuel-commodities-and-carbon-prices/)
162
                "oil": 12.9*3.6,  # [EUR/MWh]
163
                "gas": 5.6*3.6,  # [EUR/MWh]
164
                "coal": 3.0*3.6,  # [EUR/MWh]
165
                "lignite": 1.1*3.6,  # [EUR/MWh]
166
                "nuclear": 0.47*3.6,  # [EUR/MWh]
167
                "biomass": read_costs(read_csv(2020), "biomass", "fuel"),
168
            },
169
            "co2_costs": 24.7,  # [EUR/t_CO2], source:
170
                #https://de.statista.com/statistik/daten/studie/1304069/umfrage/preisentwicklung-von-co2-emissionsrechten-in-eu/
171
            "co2_emissions": {  # Netzentwicklungsplan Strom 2035, Version 2021, 1. Entwurf, p. 40, table 8
172
                "waste": 0.165,  # [t_CO2/MW_th]
173
                "lignite": 0.393,  # [t_CO2/MW_th]
174
                "gas": 0.201,  # [t_CO2/MW_th]
175
                "nuclear": 0.0,  # [t_CO2/MW_th]
176
                "oil": 0.288,  # [t_CO2/MW_th]
177
                "coal": 0.335,  # [t_CO2/MW_th]
178
                "other_non_renewable": 0.268,  # [t_CO2/MW_th]
179
            },
180
            "interest_rate": 0.05,  # [p.u.]
181
        }
182
183
    else:
184
        print(f"Scenario name {scenario} is not valid.")
185
186
    return parameters
187
188
189
def electricity(scenario):
190
    """Returns paramaters of the electricity sector for the selected scenario.
191
192
    Parameters
193
    ----------
194
    scenario : str
195
        Name of the scenario.
196
197
    Returns
198
    -------
199
    parameters : dict
200
        List of parameters of electricity sector
201
202
    """
203
204
    if scenario == "eGon2035":
205
        costs = read_csv(2035)
206
207
        parameters = {"grid_topology": "Status Quo"}
208
        # Insert effciencies in p.u.
209
        parameters["efficiency"] = {
210
            "oil": read_costs(costs, "oil", "efficiency"),
211
            "battery": {
212
                "store": read_costs(costs, "battery inverter", "efficiency")
213
                ** 0.5,
214
                "dispatch": read_costs(costs, "battery inverter", "efficiency")
215
                ** 0.5,
216
                "standing_loss": 0,
217
                "max_hours": 6,
218
                "cyclic_state_of_charge": True,
219
            },
220
            "pumped_hydro": {
221
                "store": read_costs(costs, "PHS", "efficiency") ** 0.5,
222
                "dispatch": read_costs(costs, "PHS", "efficiency") ** 0.5,
223
                "standing_loss": 0,
224
                "max_hours": 6,
225
                "cyclic_state_of_charge": True,
226
            },
227
        }
228
        # Warning: Electrical parameters are set in osmTGmod, editing these values will not change the data!
229
        parameters["electrical_parameters"] = {
230
            "ac_line_110kV": {
231
                "s_nom": 260,  # [MVA]
232
                "R": 0.109,  # [Ohm/km]
233
                "L": 1.2,  # [mH/km]
234
            },
235
            "ac_cable_110kV": {
236
                "s_nom": 280,  # [MVA]
237
                "R": 0.0177,  # [Ohm/km]
238
                "L": 0.3,  # [mH/km]
239
            },
240
            "ac_line_220kV": {
241
                "s_nom": 520,  # [MVA]
242
                "R": 0.109,  # [Ohm/km]
243
                "L": 1.0,  # [mH/km]
244
            },
245
            "ac_cable_220kV": {
246
                "s_nom": 550,  # [MVA]
247
                "R": 0.0176,  # [Ohm/km]
248
                "L": 0.3,  # [mH/km]
249
            },
250
            "ac_line_380kV": {
251
                "s_nom": 1790,  # [MVA]
252
                "R": 0.028,  # [Ohm/km]
253
                "L": 0.8,  # [mH/km]
254
            },
255
            "ac_cable_380kV": {
256
                "s_nom": 925,  # [MVA]
257
                "R": 0.0175,  # [Ohm/km]
258
                "L": 0.3,  # [mH/km]
259
            },
260
        }
261
262
        # Insert overnight investment costs
263
        # Source for eHV grid costs: Netzentwicklungsplan Strom 2035, Version 2021, 2. Entwurf
264
        # Source for HV lines and cables: Dena Verteilnetzstudie 2021, p. 146
265
        parameters["overnight_cost"] = {
266
            "ac_ehv_overhead_line": 2.5e6
267
            / (
268
                2
269
                * parameters["electrical_parameters"]["ac_line_380kV"]["s_nom"]
270
            ),  # [EUR/km/MW]
271
            "ac_ehv_cable": 11.5e6
272
            / (
273
                2
274
                * parameters["electrical_parameters"]["ac_cable_380kV"][
275
                    "s_nom"
276
                ]
277
            ),  # [EUR/km/MW]
278
            "ac_hv_overhead_line": 0.06e6
279
            / parameters["electrical_parameters"]["ac_line_110kV"][
280
                "s_nom"
281
            ],  # [EUR/km/MW]
282
            "ac_hv_cable": 0.8e6
283
            / parameters["electrical_parameters"]["ac_cable_110kV"][
284
                "s_nom"
285
            ],  # [EUR/km/MW]
286
            "dc_overhead_line": 0.5e3,  # [EUR/km/MW]
287
            "dc_cable": 3.25e3,  # [EUR/km/MW]
288
            "dc_inverter": 0.3e6,  # [EUR/MW]
289
            "transformer_380_110": 17.33e3,  # [EUR/MVA]
290
            "transformer_380_220": 13.33e3,  # [EUR/MVA]
291
            "transformer_220_110": 17.5e3,  # [EUR/MVA]
292
            "battery inverter": read_costs(
293
                costs, "battery inverter", "investment"
294
            ),
295
            "battery storage": read_costs(
296
                costs, "battery storage", "investment"
297
            ),
298
        }
299
300
        parameters["lifetime"] = {
301
            "ac_ehv_overhead_line": read_costs(
302
                costs, "HVAC overhead", "lifetime"
303
            ),
304
            "ac_ehv_cable": read_costs(costs, "HVAC overhead", "lifetime"),
305
            "ac_hv_overhead_line": read_costs(
306
                costs, "HVAC overhead", "lifetime"
307
            ),
308
            "ac_hv_cable": read_costs(costs, "HVAC overhead", "lifetime"),
309
            "dc_overhead_line": read_costs(costs, "HVDC overhead", "lifetime"),
310
            "dc_cable": read_costs(costs, "HVDC overhead", "lifetime"),
311
            "dc_inverter": read_costs(costs, "HVDC inverter pair", "lifetime"),
312
            "transformer_380_110": read_costs(
313
                costs, "HVAC overhead", "lifetime"
314
            ),
315
            "transformer_380_220": read_costs(
316
                costs, "HVAC overhead", "lifetime"
317
            ),
318
            "transformer_220_110": read_costs(
319
                costs, "HVAC overhead", "lifetime"
320
            ),
321
            "battery inverter": read_costs(
322
                costs, "battery inverter", "lifetime"
323
            ),
324
            "battery storage": read_costs(
325
                costs, "battery storage", "lifetime"
326
            ),
327
        }
328
        # Insert annualized capital costs
329
        # lines in EUR/km/MW/a
330
        # transfermer, inverter, battery in EUR/MW/a
331
        parameters["capital_cost"] = {}
332
333
        for comp in parameters["overnight_cost"].keys():
334
            parameters["capital_cost"][comp] = annualize_capital_costs(
335
                parameters["overnight_cost"][comp],
336
                parameters["lifetime"][comp],
337
                global_settings("eGon2035")["interest_rate"],
338
            )
339
340
        parameters["capital_cost"]["battery"] = (
341
            parameters["capital_cost"]["battery inverter"]
342
            + parameters["efficiency"]["battery"]["max_hours"]
343
            * parameters["capital_cost"]["battery storage"]
344
        )
345
346
        # Insert marginal_costs in EUR/MWh
347
        # marginal cost can include fuel, C02 and operation and maintenance costs
348
        parameters["marginal_cost"] = {
349
            "oil": global_settings(scenario)["fuel_costs"]["oil"]
350
            / read_costs(costs, "oil", "efficiency")
351
            + read_costs(costs, "oil", "VOM")
352
            + global_settings(scenario)["co2_costs"]
353
            * global_settings(scenario)["co2_emissions"]["oil"]
354
            / read_costs(costs, "oil", "efficiency"),
355
            "other_non_renewable": global_settings(scenario)["fuel_costs"][
356
                "gas"
357
            ] / read_costs(costs, "OCGT", "efficiency")
358
            + global_settings(scenario)["co2_costs"]
359
            * global_settings(scenario)["co2_emissions"][
360
                "other_non_renewable"
361
            ] / read_costs(costs, "OCGT", "efficiency"),
362
            "lignite": global_settings(scenario)["fuel_costs"]["lignite"]
363
            / read_costs(costs, "lignite", "efficiency")
364
            + read_costs(costs, "lignite", "VOM")
365
            + global_settings(scenario)["co2_costs"]
366
            * global_settings(scenario)["co2_emissions"]["lignite"]
367
            / read_costs(costs, "lignite", "efficiency"),
368
            "coal": global_settings(scenario)["fuel_costs"]["coal"]
369
            / read_costs(costs, "coal", "efficiency")
370
            + read_costs(costs, "coal", "VOM")
371
            + global_settings(scenario)["co2_costs"]
372
            * global_settings(scenario)["co2_emissions"]["coal"]
373
            / read_costs(costs, "coal", "efficiency"),
374
            "nuclear": global_settings(scenario)["fuel_costs"]["nuclear"]
375
            / read_costs(costs, "nuclear", "efficiency")
376
            + read_costs(costs, "nuclear", "VOM"),
377
            "biomass": global_settings(scenario)["fuel_costs"]["biomass"]
378
            / read_costs(costs, "biomass", "efficiency")
379
            + read_costs(costs, "biomass CHP", "VOM"),
380
            "wind_offshore": read_costs(costs, "offwind", "VOM"),
381
            "wind_onshore": read_costs(costs, "onwind", "VOM"),
382
            "solar": read_costs(costs, "solar", "VOM"),
383
            "run_of_river": 0,
384
            "reservoir": 0,
385
        }
386
387
    elif scenario == "eGon100RE":
388
        costs = read_csv(2050)
389
390
        parameters = {"grid_topology": "Status Quo"}
391
392
        # Insert effciencies in p.u.
393
        parameters["efficiency"] = {
394
            "battery": {
395
                "store": read_costs(costs, "battery inverter", "efficiency")
396
                ** 0.5,
397
                "dispatch": read_costs(costs, "battery inverter", "efficiency")
398
                ** 0.5,
399
                "standing_loss": 0,
400
                "max_hours": 6,
401
                "cyclic_state_of_charge": True,
402
            },
403
            "pumped_hydro": {
404
                "store": read_costs(costs, "PHS", "efficiency") ** 0.5,
405
                "dispatch": read_costs(costs, "PHS", "efficiency") ** 0.5,
406
                "standing_loss": 0,
407
                "max_hours": 6,
408
                "cyclic_state_of_charge": True,
409
            },
410
        }
411
        # Warning: Electrical parameters are set in osmTGmod, editing these values will not change the data!
412
        parameters["electrical_parameters"] = {
413
            "ac_line_110kV": {
414
                "s_nom": 260,  # [MVA]
415
                "R": 0.109,  # [Ohm/km]
416
                "L": 1.2,  # [mH/km]
417
            },
418
            "ac_cable_110kV": {
419
                "s_nom": 280,  # [MVA]
420
                "R": 0.0177,  # [Ohm/km]
421
                "L": 0.3,  # [mH/km]
422
            },
423
            "ac_line_220kV": {
424
                "s_nom": 520,  # [MVA]
425
                "R": 0.109,  # [Ohm/km]
426
                "L": 1.0,  # [mH/km]
427
            },
428
            "ac_cable_220kV": {
429
                "s_nom": 550,  # [MVA]
430
                "R": 0.0176,  # [Ohm/km]
431
                "L": 0.3,  # [mH/km]
432
            },
433
            "ac_line_380kV": {
434
                "s_nom": 1790,  # [MVA]
435
                "R": 0.028,  # [Ohm/km]
436
                "L": 0.8,  # [mH/km]
437
            },
438
            "ac_cable_380kV": {
439
                "s_nom": 925,  # [MVA]
440
                "R": 0.0175,  # [Ohm/km]
441
                "L": 0.3,  # [mH/km]
442
            },
443
        }
444
445
        # Insert overnight investment costs
446
        # Source for transformer costs: Netzentwicklungsplan Strom 2035, Version 2021, 2. Entwurf
447
        # Source for HV lines and cables: Dena Verteilnetzstudie 2021, p. 146
448
        parameters["overnight_cost"] = {
449
            "ac_ehv_overhead_line": read_costs(
450
                costs, "HVAC overhead", "investment"
451
            ),  # [EUR/km/MW]
452
            "ac_hv_overhead_line": 0.06e6
453
            / parameters["electrical_parameters"]["ac_line_110kV"][
454
                "s_nom"
455
            ],  # [EUR/km/MW]
456
            "ac_hv_cable": 0.8e6
457
            / parameters["electrical_parameters"]["ac_cable_110kV"][
458
                "s_nom"
459
            ],  # [EUR/km/MW]
460
            "dc_overhead_line": read_costs(
461
                costs, "HVDC overhead", "investment"
462
            ),
463
            "dc_cable": read_costs(costs, "HVDC overhead", "investment"),
464
            "dc_inverter": read_costs(
465
                costs, "HVDC inverter pair", "investment"
466
            ),
467
            "transformer_380_110": 17.33e3,  # [EUR/MVA]
468
            "transformer_380_220": 13.33e3,  # [EUR/MVA]
469
            "transformer_220_110": 17.5e3,  # [EUR/MVA]
470
            "battery inverter": read_costs(
471
                costs, "battery inverter", "investment"
472
            ),
473
            "battery storage": read_costs(
474
                costs, "battery storage", "investment"
475
            ),
476
        }
477
478
        parameters["lifetime"] = {
479
            "ac_ehv_overhead_line": read_costs(
480
                costs, "HVAC overhead", "lifetime"
481
            ),
482
            "ac_ehv_cable": read_costs(costs, "HVAC overhead", "lifetime"),
483
            "ac_hv_overhead_line": read_costs(
484
                costs, "HVAC overhead", "lifetime"
485
            ),
486
            "ac_hv_cable": read_costs(costs, "HVAC overhead", "lifetime"),
487
            "dc_overhead_line": read_costs(costs, "HVDC overhead", "lifetime"),
488
            "dc_cable": read_costs(costs, "HVDC overhead", "lifetime"),
489
            "dc_inverter": read_costs(costs, "HVDC inverter pair", "lifetime"),
490
            "transformer_380_110": read_costs(
491
                costs, "HVAC overhead", "lifetime"
492
            ),
493
            "transformer_380_220": read_costs(
494
                costs, "HVAC overhead", "lifetime"
495
            ),
496
            "transformer_220_110": read_costs(
497
                costs, "HVAC overhead", "lifetime"
498
            ),
499
            "battery inverter": read_costs(
500
                costs, "battery inverter", "lifetime"
501
            ),
502
            "battery storage": read_costs(
503
                costs, "battery storage", "lifetime"
504
            ),
505
        }
506
        # Insert annualized capital costs
507
        # lines in EUR/km/MW/a
508
        # transfermer, inverter, battery in EUR/MW/a
509
        parameters["capital_cost"] = {}
510
511
        for comp in parameters["overnight_cost"].keys():
512
            parameters["capital_cost"][comp] = annualize_capital_costs(
513
                parameters["overnight_cost"][comp],
514
                parameters["lifetime"][comp],
515
                global_settings("eGon2035")["interest_rate"],
516
            )
517
518
        parameters["capital_cost"]["battery"] = (
519
            parameters["capital_cost"]["battery inverter"]
520
            + parameters["efficiency"]["battery"]["max_hours"]
521
            * parameters["capital_cost"]["battery storage"]
522
        )
523
524
        # Insert marginal_costs in EUR/MWh
525
        # marginal cost can include fuel, C02 and operation and maintenance costs
526
        parameters["marginal_cost"] = {
527
            "wind_offshore": read_costs(costs, "offwind", "VOM"),
528
            "wind_onshore": read_costs(costs, "onwind", "VOM"),
529
            "solar": read_costs(costs, "solar", "VOM"),
530
            "run_of_river": 0,
531
            "reservoir": 0,
532
        }
533
534
    elif scenario == "eGon2021":
535
        parameters = {}
536
537
    elif (scenario == "status2019") or (scenario == "status2023"):
538
        costs = read_csv(2020)
539
540
        parameters = {"grid_topology": "Status Quo"}
541
        # Insert effciencies in p.u.
542
        parameters["efficiency"] = {
543
            "oil": read_costs(costs, "oil", "efficiency"),
544
            "battery": {
545
                "store": read_costs(costs, "battery inverter", "efficiency")
546
                ** 0.5,
547
                "dispatch": read_costs(costs, "battery inverter", "efficiency")
548
                ** 0.5,
549
                "standing_loss": 0,
550
                "max_hours": 6,
551
                "cyclic_state_of_charge": True,
552
            },
553
            "pumped_hydro": {
554
                "store": read_costs(costs, "PHS", "efficiency") ** 0.5,
555
                "dispatch": read_costs(costs, "PHS", "efficiency") ** 0.5,
556
                "standing_loss": 0,
557
                "max_hours": 6,
558
                "cyclic_state_of_charge": True,
559
            },
560
        }
561
        # Warning: Electrical parameters are set in osmTGmod, editing these values will not change the data!
562
        parameters["electrical_parameters"] = {
563
            "ac_line_110kV": {
564
                "s_nom": 260,  # [MVA]
565
                "R": 0.109,  # [Ohm/km]
566
                "L": 1.2,  # [mH/km]
567
            },
568
            "ac_cable_110kV": {
569
                "s_nom": 280,  # [MVA]
570
                "R": 0.0177,  # [Ohm/km]
571
                "L": 0.3,  # [mH/km]
572
            },
573
            "ac_line_220kV": {
574
                "s_nom": 520,  # [MVA]
575
                "R": 0.109,  # [Ohm/km]
576
                "L": 1.0,  # [mH/km]
577
            },
578
            "ac_cable_220kV": {
579
                "s_nom": 550,  # [MVA]
580
                "R": 0.0176,  # [Ohm/km]
581
                "L": 0.3,  # [mH/km]
582
            },
583
            "ac_line_380kV": {
584
                "s_nom": 1790,  # [MVA]
585
                "R": 0.028,  # [Ohm/km]
586
                "L": 0.8,  # [mH/km]
587
            },
588
            "ac_cable_380kV": {
589
                "s_nom": 925,  # [MVA]
590
                "R": 0.0175,  # [Ohm/km]
591
                "L": 0.3,  # [mH/km]
592
            },
593
        }
594
595
        # Insert overnight investment costs
596
        # Source for eHV grid costs: Netzentwicklungsplan Strom 2035, Version 2021, 2. Entwurf
597
        # Source for HV lines and cables: Dena Verteilnetzstudie 2021, p. 146
598
        parameters["overnight_cost"] = {
599
            "ac_ehv_overhead_line": 2.5e6
600
            / (
601
                2
602
                * parameters["electrical_parameters"]["ac_line_380kV"]["s_nom"]
603
            ),  # [EUR/km/MW]
604
            "ac_ehv_cable": 11.5e6
605
            / (
606
                2
607
                * parameters["electrical_parameters"]["ac_cable_380kV"][
608
                    "s_nom"
609
                ]
610
            ),  # [EUR/km/MW]
611
            "ac_hv_overhead_line": 0.06e6
612
            / parameters["electrical_parameters"]["ac_line_110kV"][
613
                "s_nom"
614
            ],  # [EUR/km/MW]
615
            "ac_hv_cable": 0.8e6
616
            / parameters["electrical_parameters"]["ac_cable_110kV"][
617
                "s_nom"
618
            ],  # [EUR/km/MW]
619
            "dc_overhead_line": 0.5e3,  # [EUR/km/MW]
620
            "dc_cable": 3.25e3,  # [EUR/km/MW]
621
            "dc_inverter": 0.3e6,  # [EUR/MW]
622
            "transformer_380_110": 17.33e3,  # [EUR/MVA]
623
            "transformer_380_220": 13.33e3,  # [EUR/MVA]
624
            "transformer_220_110": 17.5e3,  # [EUR/MVA]
625
            "battery inverter": read_costs(
626
                costs, "battery inverter", "investment"
627
            ),
628
            "battery storage": read_costs(
629
                costs, "battery storage", "investment"
630
            ),
631
        }
632
633
        parameters["lifetime"] = {
634
            "ac_ehv_overhead_line": read_costs(
635
                costs, "HVAC overhead", "lifetime"
636
            ),
637
            "ac_ehv_cable": read_costs(costs, "HVAC overhead", "lifetime"),
638
            "ac_hv_overhead_line": read_costs(
639
                costs, "HVAC overhead", "lifetime"
640
            ),
641
            "ac_hv_cable": read_costs(costs, "HVAC overhead", "lifetime"),
642
            "dc_overhead_line": read_costs(costs, "HVDC overhead", "lifetime"),
643
            "dc_cable": read_costs(costs, "HVDC overhead", "lifetime"),
644
            "dc_inverter": read_costs(costs, "HVDC inverter pair", "lifetime"),
645
            "transformer_380_110": read_costs(
646
                costs, "HVAC overhead", "lifetime"
647
            ),
648
            "transformer_380_220": read_costs(
649
                costs, "HVAC overhead", "lifetime"
650
            ),
651
            "transformer_220_110": read_costs(
652
                costs, "HVAC overhead", "lifetime"
653
            ),
654
            "battery inverter": read_costs(
655
                costs, "battery inverter", "lifetime"
656
            ),
657
            "battery storage": read_costs(
658
                costs, "battery storage", "lifetime"
659
            ),
660
        }
661
        # Insert annualized capital costs
662
        # lines in EUR/km/MW/a
663
        # transfermer, inverter, battery in EUR/MW/a
664
        parameters["capital_cost"] = {}
665
666
        for comp in parameters["overnight_cost"].keys():
667
            parameters["capital_cost"][comp] = annualize_capital_costs(
668
                parameters["overnight_cost"][comp],
669
                parameters["lifetime"][comp],
670
                global_settings("status2019")["interest_rate"],
671
            )
672
673
        parameters["capital_cost"]["battery"] = (
674
            parameters["capital_cost"]["battery inverter"]
675
            + parameters["efficiency"]["battery"]["max_hours"]
676
            * parameters["capital_cost"]["battery storage"]
677
        )
678
679
        parameters["marginal_cost"] = {
680
            "oil": global_settings(scenario)["fuel_costs"]["oil"]
681
            / read_costs(costs, "oil", "efficiency")
682
            + read_costs(costs, "oil", "VOM")
683
            + global_settings(scenario)["co2_costs"]
684
            * global_settings(scenario)["co2_emissions"]["oil"]
685
            / read_costs(costs, "oil", "efficiency"),
686
            "other_non_renewable": global_settings(scenario)["fuel_costs"][
687
                "gas"
688
            ] / read_costs(costs, "OCGT", "efficiency")
689
            + global_settings(scenario)["co2_costs"]
690
            * global_settings(scenario)["co2_emissions"][
691
                "other_non_renewable"
692
            ] / read_costs(costs, "OCGT", "efficiency"),
693
            "lignite": global_settings(scenario)["fuel_costs"]["lignite"]
694
            / read_costs(costs, "lignite", "efficiency")
695
            + read_costs(costs, "lignite", "VOM")
696
            + global_settings(scenario)["co2_costs"]
697
            * global_settings(scenario)["co2_emissions"]["lignite"]
698
            / read_costs(costs, "lignite", "efficiency"),
699
            "coal": global_settings(scenario)["fuel_costs"]["coal"]
700
            / read_costs(costs, "coal", "efficiency")
701
            + read_costs(costs, "coal", "VOM")
702
            + global_settings(scenario)["co2_costs"]
703
            * global_settings(scenario)["co2_emissions"]["coal"]
704
            / read_costs(costs, "coal", "efficiency"),
705
            "OCGT": global_settings(scenario)["fuel_costs"]["gas"]
706
            / read_costs(costs, "OCGT", "efficiency")
707
            + read_costs(costs, "OCGT", "VOM")
708
            + global_settings(scenario)["co2_costs"]
709
            * global_settings(scenario)["co2_emissions"]["gas"]
710
            / read_costs(costs, "OCGT", "efficiency"),
711
            "nuclear": global_settings(scenario)["fuel_costs"]["nuclear"]
712
            / read_costs(costs, "nuclear", "efficiency")
713
            + read_costs(costs, "nuclear", "VOM"),
714
            "biomass": global_settings(scenario)["fuel_costs"]["biomass"]
715
            / read_costs(costs, "biomass CHP", "efficiency")
716
            + read_costs(costs, "biomass CHP", "VOM"),
717
            "wind_offshore": read_costs(costs, "offwind", "VOM"),
718
            "wind_onshore": read_costs(costs, "onwind", "VOM"),
719
            "solar": read_costs(costs, "solar", "VOM"),
720
            "run_of_river": 0,
721
            "reservoir": 0,
722
        }
723
724
    else:
725
        print(f"Scenario name {scenario} is not valid.")
726
727
    return parameters
728
729
730
def gas(scenario):
731
    """Returns paramaters of the gas sector for the selected scenario.
732
733
    Parameters
734
    ----------
735
    scenario : str
736
        Name of the scenario.
737
738
    Returns
739
    -------
740
    parameters : dict
741
        List of parameters of gas sector
742
743
    """
744
745
    if scenario == "eGon2035":
746
        costs = read_csv(2035)
747
748
        parameters = {
749
            "main_gas_carrier": "CH4",
750
            "H2_feedin_volumetric_fraction": 0.15,
751
        }
752
        
753
        # Insert effciencies in p.u.
754
        parameters["efficiency"] = {
755
            "power_to_H2": 0.6805,      #source: project internal assumption Fraunhofer ISE
756
            "H2_to_power": read_costs(costs, "fuel cell", "efficiency"),
757
            "CH4_to_H2": read_costs(costs, "SMR", "efficiency"),
758
            "H2_feedin": 1,
759
            "H2_to_CH4": read_costs(costs, "methanation", "efficiency"),
760
            "OCGT": read_costs(costs, "OCGT", "efficiency"),
761
            "power_to_Heat": 0.2,     #overall efficiency (20% electrical Input converted into waste-heat); source: project internal assumption Fraunhofer ISE
762
            "power_to_O2": 0.04,          #O2-transfer efficiency; source:  Sayed Sadat, Modeling Regional Utilization of the electrolysers Co-Products Oxygen and Heat in Germany, 2024
763
        }
764
        
765
        # Insert overnight investment costs
766
        parameters["overnight_cost"] = {
767
            "power_to_H2_system": 452_000, #[EUR/MW]  source: project internal assumption Fraunhofer ISE
768
            "power_to_H2_stack": 0.21 * 452_000, #[EUR/MW] source: project internal assumption Fraunhofer ISE
769
            "power_to_H2_OPEX": 0.03 * 452_000, #[EUR/MW/a]  3% of CAPEX, source: project internal assumption Fraunhofer ISE
770
            "H2_to_power": read_costs(costs, "fuel cell", "investment"),
771
            "CH4_to_H2": read_costs(costs, "SMR", "investment"),
772
            "H2_to_CH4": read_costs(costs, "methanation", "investment"),
773
            "H2_feedin": 0,
774
            "H2_underground": read_costs(
775
                costs, "hydrogen storage underground", "investment"
776
            ),
777
            "H2_overground": read_costs(
778
                costs, "hydrogen storage tank incl. compressor", "investment"
779
            ),
780
            "H2_pipeline": read_costs(costs, "H2 (g) pipeline", "investment"), # [EUR/MW/km] 
781
            "Heat_exchanger": 25_000, # [EUR/MW_th] cost assumption for one additional heat_exchanger; source: project internal cost assumption by Fraunhofer ISE
782
            "Heat_pipeline": 400_000, # [EUR/MW/km]; average value for DN100-pipeline; source: L. Zimmermann, MODELLIERUNG DER ABWÄRMENUTZUNG VON ELEKTROLYSEUREN IN DEUTSCHLAND FÜR EINE TECHNO - ÖKONOMISCHE OPTIMIERUNG EINES SEKTOR - GEKOPPELTEN ENERGIESYSTEM, 2024
783
            "O2_components": 5000, # [EUR] ; source: Sayed Sadat, Modeling Regional Utilization of the electrolysers Co-Products Oxygen and Heat in Germany, 2024 
784
        }
785
        
786
        #overnight_costs for O2_pipeinecosts related to pipeline_diameter
787
        parameters["O2_pipeline_costs"] = {
788
            0.5: 500_000,  # EUR/km
789
            0.4: 450_000,  # EUR/km
790
            0.3: 400_000,  # EUR/km
791
            0.2: 350_000,  # EUR/km
792
            0.0: 300_000,  # EUR/km   (costs for any other pipeline diameter)
793
        }
794
        
795
        # Insert lifetime
796
        parameters["lifetime"] = {
797
            "power_to_H2_system": 25,  # source: project internal assumption Fraunhofer ISE
798
            "power_to_H2_stack": 15,  #85000 hours ~ 15 years; source: project internal assumption Fraunhofer ISE
799
            "power_to_H2_OPEX": 1, #given as OPEX/year
800
            "H2_to_power": read_costs(costs, "fuel cell", "lifetime"),
801
            "CH4_to_H2": read_costs(costs, "SMR", "lifetime"),
802
            "H2_to_CH4": read_costs(costs, "methanation", "lifetime"),
803
            "H2_feedin": read_costs(costs, "CH4 (g) pipeline", "lifetime"),
804
            "H2_underground": read_costs(
805
                costs, "hydrogen storage underground", "lifetime"
806
            ),
807
            "H2_overground": read_costs(
808
                costs, "hydrogen storage tank incl. compressor", "lifetime"
809
            ),
810
            "H2_pipeline": read_costs(costs, "H2 (g) pipeline", "lifetime"),  
811
            "Heat_exchanger": 20, # assumption based on lifetime heat_exchanger; source: E. van der Roest, R. Bol, T. Fens und A. van Wijk, „Utilisation of waste heat from PEM electrolysers - Unlocking local optimisation, 2023
812
            "Heat_pipeline": 20,
813
            "O2_components": 25,  # source: Sayed Sadat, Modeling Regional Utilization of the electrolysers Co-Products Oxygen and Heat in Germany, 2024 
814
        }
815
816
        # Insert annualized capital costs
817
        parameters["capital_cost"] = {}
818
        parameters["O2_capital_cost"]= {}
819
820
        for comp in parameters["overnight_cost"].keys():
821
            parameters["capital_cost"][comp] = annualize_capital_costs(
822
                parameters["overnight_cost"][comp],
823
                parameters["lifetime"][comp],
824
                global_settings("eGon2035")["interest_rate"],
825
            )
826
        
827
        for diameter in parameters["O2_pipeline_costs"].keys():
828
            parameters["O2_capital_cost"][diameter] = annualize_capital_costs(
829
                parameters["O2_pipeline_costs"][diameter],
830
                parameters["lifetime"]["O2_components"],
831
                global_settings("eGon2035")["interest_rate"],
832
            )
833
            
834
        parameters["marginal_cost"] = {
835
            "CH4": global_settings(scenario)["fuel_costs"]["gas"]
836
            + global_settings(scenario)["co2_costs"]
837
            * global_settings(scenario)["co2_emissions"]["gas"],
838
            "OCGT": read_costs(costs, "OCGT", "VOM"),
839
            "biogas": global_settings(scenario)["fuel_costs"]["gas"],
840
            "chp_gas": read_costs(costs, "central gas CHP", "VOM"),
841
        }
842
843
        # Insert max gas production (generator) over the year
844
        parameters["max_gas_generation_overtheyear"] = {
845
            "CH4": 36000000,  # [MWh] Netzentwicklungsplan Gas 2020–2030
846
            "biogas": 10000000,  # [MWh] Netzentwicklungsplan Gas 2020–2030
847
        }
848
849
    elif scenario == "eGon100RE":
850
        costs = read_csv(2050)
851
        interest_rate = 0.07  # [p.u.]
852
853
        parameters = {
854
            "main_gas_carrier": "H2",
855
            "retrofitted_CH4pipeline-to-H2pipeline_share": 0.23,
856
            # p-e-s result, this value is overwritten if p-e-s is run
857
        }
858
        # Insert effciencies in p.u.
859
        parameters["efficiency"] = {
860
            "power_to_H2": 0.709,
861
            "H2_to_power": read_costs(costs, "fuel cell", "efficiency"),
862
            "CH4_to_H2": read_costs(costs, "SMR", "efficiency"),
863
            "H2_to_CH4": read_costs(costs, "methanation", "efficiency"),
864
            "OCGT": read_costs(costs, "OCGT", "efficiency"),
865
            "power_to_Heat": 0.2,   # source: project internal assumption Fraunhofer ISE
866
            "power_to_O2": 0.015,   # source:  Sayed Sadat, Modeling Regional Utilization of the electrolysers Co-Products Oxygen and Heat in Germany, 2024
867
        }
868
869
        # Insert FOM in %
870
        parameters["FOM"] = {
871
            "H2_underground": read_costs(
872
                costs, "hydrogen storage underground", "FOM"
873
            ),
874
            "H2_overground": read_costs(
875
                costs, "hydrogen storage tank incl. compressor", "FOM"
876
            ),
877
            "power_to_H2_system": 3,  #3% of CAPEX, source: project internal assumption Fraunhofer ISE
878
            "power_to_H2_stack": 3, #3% of CAPEX source: project internal assumption Fraunhofer ISE
879
            "H2_to_power": read_costs(costs, "fuel cell", "FOM"),
880
            "CH4_to_H2": read_costs(costs, "SMR", "FOM"),
881
            "H2_to_CH4": read_costs(costs, "methanation", "FOM"),
882
            "H2_pipeline": 3, # 3% of CAPEX
883
            "Heat_exchanger": 3, # 3% of CAPEX
884
            "Heat_pipeline": 3, # 3% of CAPEX 
885
            "O2_components": 3, # 3% of CAPEX  
886
            "H2_pipeline_retrofit": read_costs(
887
                costs, "H2 (g) pipeline repurposed", "FOM"
888
            ),
889
        }
890
        
891
        # Insert overnight investment costs
892
        parameters["overnight_cost"] = {
893
            "power_to_H2_system": 357_000,  #[EUR/MW] source: project internal assumption Fraunhofer ISE
894
            "power_to_H2_stack": 0.21 * 357_000, #[EUR/MW] source: project internal assumption Fraunhofer ISE
895
            "H2_to_power": read_costs(costs, "fuel cell", "investment"),
896
            "CH4_to_H2": read_costs(costs, "SMR", "investment"),
897
            "H2_to_CH4": read_costs(costs, "methanation", "investment"),
898
            "H2_underground": read_costs(
899
                costs, "hydrogen storage underground", "investment"
900
            ),
901
            "H2_overground": read_costs(
902
                costs, "hydrogen storage tank incl. compressor", "investment"
903
            ),
904
            "H2_pipeline": read_costs(costs, "H2 (g) pipeline", "investment"), # [EUR/MW/km] 
905
            "H2_pipeline_retrofit": read_costs(
906
                costs, "H2 (g) pipeline repurposed", "FOM"
907
            ),
908
            "Heat_exchanger": 25_000, # [EUR/MW_th] cost assumption for one additional heat_exchanger; source: project internal cost assumption by Fraunhofer ISE
909
            "Heat_pipeline": 400_000, # [EUR/MW/km]; average value for DN100-pipeline; source: L. Zimmermann, MODELLIERUNG DER ABWÄRMENUTZUNG VON ELEKTROLYSEUREN IN DEUTSCHLAND FÜR EINE TECHNO - ÖKONOMISCHE OPTIMIERUNG EINES SEKTOR - GEKOPPELTEN ENERGIESYSTEM, 2024
910
            "O2_components": 5000, # [EUR] ; source toDO: ask sayed 
911
        }
912
       
913
        #overnight_costs for O2_pipeinecosts related to pipeline_diameter
914
        parameters["O2_pipeline_costs"] = {
915
            0.5: 500_000,  # EUR/km
916
            0.4: 450_000,  # EUR/km
917
            0.3: 400_000,  # EUR/km
918
            0.2: 350_000,  # EUR/km
919
            0: 300_000,  # EUR/km   (costs for any other pipeline diameter)
920
        }
921
922
        # Insert lifetime
923
        parameters["lifetime"] = {
924
            "power_to_H2_system": 30,  # source: project internal assumption Fraunhofer ISE
925
            "power_to_H2_stack": 20,  #110_000 hours ~ 20 years; source: project internal assumption Fraunhofer ISE
926
            "H2_to_power": read_costs(costs, "fuel cell", "lifetime"),
927
            "CH4_to_H2": read_costs(costs, "SMR", "lifetime"),
928
            "H2_to_CH4": read_costs(costs, "methanation", "lifetime"),
929
            "H2_feedin": read_costs(costs, "CH4 (g) pipeline", "lifetime"),
930
            "H2_underground": read_costs(
931
                costs, "hydrogen storage underground", "lifetime"
932
            ),
933
            "H2_overground": read_costs(
934
                costs, "hydrogen storage tank incl. compressor", "lifetime"
935
            ),
936
            "H2_pipeline": read_costs(costs, "H2 (g) pipeline", "lifetime"),  
937
            "H2_pipeline_retrofit": read_costs(
938
                costs, "H2 (g) pipeline repurposed", "lifetime"
939
            ),
940
            "Heat_exchanger": 20, # assumption based on lifetime heat_exchanger; source: E. van der Roest, R. Bol, T. Fens und A. van Wijk, „Utilisation of waste heat from PEM electrolysers - Unlocking local optimisation, 2023
941
            "Heat_pipeline": 20,
942
            "O2_components": 25,  # source toDO: ask sayed 
943
        }
944
945
        # Insert costs
946
        parameters["capital_cost"] = {}
947
        parameters["O2_capital_cost"] = {}
948
        
949
        for comp in parameters["overnight_cost"].keys():
950
            parameters["capital_cost"][comp] = annualize_capital_costs(
951
                parameters["overnight_cost"][comp],
952
                parameters["lifetime"][comp],
953
                interest_rate,
954
            ) + parameters["overnight_cost"][comp] * (
955
                parameters["FOM"][comp] / 100
956
            )
957
                
958
        for comp in ["H2_to_power", "H2_to_CH4"]:
959
            parameters["capital_cost"][comp] = (
960
                annualize_capital_costs(
961
                    parameters["overnight_cost"][comp],
962
                    parameters["lifetime"][comp],
963
                    interest_rate,
964
                )
965
                + parameters["overnight_cost"][comp]
966
                * (parameters["FOM"][comp] / 100)
967
            ) * parameters["efficiency"][comp]
968
969
        for diameter in parameters["O2_pipeline_costs"].keys():
970
            parameters["O2_capital_cost"][diameter] = annualize_capital_costs(
971
                parameters["O2_pipeline_costs"][diameter],
972
                parameters["lifetime"]["O2_components"],
973
                interest_rate,
974
            )
975
                    
976
        parameters["marginal_cost"] = {
977
            "OCGT": read_costs(costs, "OCGT", "VOM"),
978
            "biogas": read_costs(costs, "biogas", "fuel"),
979
            "chp_gas": read_costs(costs, "central gas CHP", "VOM"),
980
        }
981
982
    elif scenario == "eGon2021":
983
        parameters = {}
984
985
    elif scenario == "status2019":
986
        costs = read_csv(2020)
987
        parameters = {
988
            "main_gas_carrier": "CH4",
989
        }
990
991
        parameters["marginal_cost"] = {
992
            "CH4": global_settings(scenario)["fuel_costs"]["gas"]
993
            + global_settings(scenario)["co2_costs"]
994
            * global_settings(scenario)["co2_emissions"]["gas"],
995
            "OCGT": read_costs(costs, "OCGT", "VOM"),
996
            "biogas": global_settings(scenario)["fuel_costs"]["gas"],
997
            "chp_gas": read_costs(costs, "central gas CHP", "VOM"),
998
        }
999
        # Insert effciencies in p.u.
1000
        parameters["efficiency"] = {
1001
            "OCGT": read_costs(costs, "OCGT", "efficiency"),
1002
        }
1003
1004
    else:
1005
        print(f"Scenario name {scenario} is not valid.")
1006
1007
    return parameters
1008
1009
1010
def mobility(scenario):
1011
    """Returns parameters of the mobility sector for the selected scenario.
1012
1013
    Parameters
1014
    ----------
1015
    scenario : str
1016
        Name of the scenario.
1017
1018
    Returns
1019
    -------
1020
    parameters : dict
1021
        List of parameters of mobility sector
1022
1023
    Notes
1024
    -----
1025
    For a detailed description of the parameters see module
1026
    :mod:`egon.data.datasets.emobility.motorized_individual_travel`.
1027
    """
1028
1029
    if scenario == "eGon2035":
1030
        parameters = {
1031
            "motorized_individual_travel": {
1032
                "NEP C 2035": {
1033
                    "ev_count": 15100000,
1034
                    "bev_mini_share": 0.1589,
1035
                    "bev_medium_share": 0.3533,
1036
                    "bev_luxury_share": 0.1053,
1037
                    "phev_mini_share": 0.0984,
1038
                    "phev_medium_share": 0.2189,
1039
                    "phev_luxury_share": 0.0652,
1040
                    "model_parameters": {},
1041
                }
1042
            }
1043
        }
1044
1045
    elif scenario == "eGon100RE":
1046
        # eGon100RE has 3 Scenario variations
1047
        #   * allocation will always be done for all scenarios
1048
        #   * model data will be written to tables `egon_etrago_*` only
1049
        #     for the variation as speciefied in `datasets.yml`
1050
        parameters = {
1051
            "motorized_individual_travel": {
1052
                "Reference 2050": {
1053
                    "ev_count": 25065000,
1054
                    "bev_mini_share": 0.1589,
1055
                    "bev_medium_share": 0.3533,
1056
                    "bev_luxury_share": 0.1053,
1057
                    "phev_mini_share": 0.0984,
1058
                    "phev_medium_share": 0.2189,
1059
                    "phev_luxury_share": 0.0652,
1060
                    "model_parameters": {},
1061
                },
1062
                "Mobility Transition 2050": {
1063
                    "ev_count": 37745000,
1064
                    "bev_mini_share": 0.1589,
1065
                    "bev_medium_share": 0.3533,
1066
                    "bev_luxury_share": 0.1053,
1067
                    "phev_mini_share": 0.0984,
1068
                    "phev_medium_share": 0.2189,
1069
                    "phev_luxury_share": 0.0652,
1070
                    "model_parameters": {},
1071
                },
1072
                "Electrification 2050": {
1073
                    "ev_count": 47700000,
1074
                    "bev_mini_share": 0.1589,
1075
                    "bev_medium_share": 0.3533,
1076
                    "bev_luxury_share": 0.1053,
1077
                    "phev_mini_share": 0.0984,
1078
                    "phev_medium_share": 0.2189,
1079
                    "phev_luxury_share": 0.0652,
1080
                    "model_parameters": {},
1081
                },
1082
            }
1083
        }
1084
1085
    elif scenario == "eGon2021":
1086
        parameters = {}
1087
1088
    elif scenario == "status2019":
1089
        parameters = {
1090
            "motorized_individual_travel": {
1091
                "status2019": {
1092
                    "ev_count": 200000,
1093
                    "bev_mini_share": 0.1589,
1094
                    "bev_medium_share": 0.3533,
1095
                    "bev_luxury_share": 0.1053,
1096
                    "phev_mini_share": 0.0984,
1097
                    "phev_medium_share": 0.2189,
1098
                    "phev_luxury_share": 0.0652,
1099
                    "model_parameters": {},
1100
                }
1101
            }
1102
        }
1103
1104
    elif scenario == "status2023":
1105
        parameters = {
1106
            "motorized_individual_travel": {
1107
                "status2023": {
1108
                    "ev_count": 2577664,
1109
                    "bev_mini_share": 0.1535,
1110
                    "bev_medium_share": 0.3412,
1111
                    "bev_luxury_share": 0.1017,
1112
                    "phev_mini_share": 0.1038,
1113
                    "phev_medium_share": 0.2310,
1114
                    "phev_luxury_share": 0.0688,
1115
                    "model_parameters": {},
1116
                }
1117
            }
1118
        }
1119
1120
    else:
1121
        print(f"Scenario name {scenario} is not valid.")
1122
        parameters = dict()
1123
1124
    return parameters
1125
1126
1127
def heat(scenario):
1128
    """Returns paramaters of the heat sector for the selected scenario.
1129
1130
    Parameters
1131
    ----------
1132
    scenario : str
1133
        Name of the scenario.
1134
1135
    Returns
1136
    -------
1137
    parameters : dict
1138
        List of parameters of heat sector
1139
1140
    """
1141
1142
    if scenario == "eGon2035":
1143
        costs = read_csv(2035)
1144
1145
        parameters = {
1146
            "DE_demand_reduction_residential": 0.854314018923104,
1147
            "DE_demand_reduction_service": 0.498286864771128,
1148
            "DE_district_heating_share": 0.14,
1149
        }
1150
1151
        # Insert efficiency in p.u.
1152
        parameters["efficiency"] = {
1153
            "water_tank_charger": read_costs(
1154
                costs, "water tank charger", "efficiency"
1155
            ),
1156
            "water_tank_discharger": read_costs(
1157
                costs, "water tank discharger", "efficiency"
1158
            ),
1159
            "central_resistive_heater": read_costs(
1160
                costs, "central resistive heater", "efficiency"
1161
            ),
1162
            "central_gas_boiler": read_costs(
1163
                costs, "central gas boiler", "efficiency"
1164
            ),
1165
            "rural_resistive_heater": read_costs(
1166
                costs, "decentral resistive heater", "efficiency"
1167
            ),
1168
            "rural_gas_boiler": read_costs(
1169
                costs, "decentral gas boiler", "efficiency"
1170
            ),
1171
        }
1172
1173
        # Insert overnight investment costs, in EUR/MWh
1174
        parameters["overnight_cost"] = {
1175
            "central_water_tank": read_costs(
1176
                costs, "central water tank storage", "investment"
1177
            ),
1178
            "rural_water_tank": read_costs(
1179
                costs, "decentral water tank storage", "investment"
1180
            ),
1181
        }
1182
1183
        # Insert lifetime
1184
        parameters["lifetime"] = {
1185
            "central_water_tank": read_costs(
1186
                costs, "central water tank storage", "lifetime"
1187
            ),
1188
            "rural_water_tank": read_costs(
1189
                costs, "decentral water tank storage", "lifetime"
1190
            ),
1191
        }
1192
1193
        # Insert annualized capital costs
1194
        parameters["capital_cost"] = {}
1195
1196
        for comp in parameters["overnight_cost"].keys():
1197
            parameters["capital_cost"][comp] = annualize_capital_costs(
1198
                parameters["overnight_cost"][comp],
1199
                parameters["lifetime"][comp],
1200
                global_settings("eGon2035")["interest_rate"],
1201
            )
1202
1203
        # Insert marginal_costs in EUR/MWh
1204
        # marginal cost can include fuel, C02 and operation and maintenance costs
1205
        parameters["marginal_cost"] = {
1206
            "central_heat_pump": read_costs(
1207
                costs, "central air-sourced heat pump", "VOM"
1208
            ),
1209
            "central_gas_chp": read_costs(costs, "central gas CHP", "VOM"),
1210
            "central_gas_boiler": read_costs(
1211
                costs, "central gas boiler", "VOM"
1212
            ),
1213
            "central_resistive_heater": read_costs(
1214
                costs, "central resistive heater", "VOM"
1215
            ),
1216
            "geo_thermal": 2.9,  # Danish Energy Agency
1217
            "water_tank_charger": 0,  # Danish Energy Agency
1218
            "water_tank_discharger": 0,  # Danish Energy Agency
1219
            "rural_heat_pump": 0,  # Danish Energy Agency, Technology Data for Individual Heating Plants
1220
        }
1221
1222
    elif scenario == "eGon100RE":
1223
        costs = read_csv(2050)
1224
1225
        parameters = {
1226
            "DE_demand_residential_MWh": 536692489.8152325 * 0.71542,
1227
            # [MWh], source: pypsa-eur run from 2024/12/23:
1228
            # total heat demand muliplied by residential share from resources/pop_weighted_heat_totals
1229
            "DE_demand_service_MWh": 536692489.8152325 * (1-0.71542),
1230
            # [MWh], source: pypsa-eur run from 2024/12/23:
1231
            # total heat demand muliplied by service share from resources/pop_weighted_heat_totals
1232
            "DE_district_heating_share": 0.42311285313808533,
1233
             # [%], source: pypsa-eur run from 2024/12/23
1234
        }
1235
1236
1237
        parameters["marginal_cost"] = {
1238
            "central_heat_pump": read_costs(
1239
                costs, "central air-sourced heat pump", "VOM"
1240
            ),
1241
            "central_gas_chp": read_costs(costs, "central gas CHP", "VOM"),
1242
            "central_gas_boiler": read_costs(
1243
                costs, "central gas boiler", "VOM"
1244
            ),
1245
            "central_resistive_heater": read_costs(
1246
                costs, "central resistive heater", "VOM"
1247
            ),
1248
            "geo_thermal": 2.7,  # Danish Energy Agency
1249
            "water_tank_charger": 0,  # Danish Energy Agency
1250
            "water_tank_discharger": 0,  # Danish Energy Agency
1251
            "rural_heat_pump": 0,  # Danish Energy Agency, Technology Data for Individual Heating Plants
1252
        }
1253
1254
        # Insert efficiency in p.u.
1255
        parameters["efficiency"] = {
1256
            "water_tank_charger": read_costs(
1257
                costs, "water tank charger", "efficiency"
1258
            ),
1259
            "water_tank_discharger": read_costs(
1260
                costs, "water tank discharger", "efficiency"
1261
            ),
1262
            "central_resistive_heater": read_costs(
1263
                costs, "central resistive heater", "efficiency"
1264
            ),
1265
            "central_gas_boiler": read_costs(
1266
                costs, "central gas boiler", "efficiency"
1267
            ),
1268
            "rural_resistive_heater": read_costs(
1269
                costs, "decentral resistive heater", "efficiency"
1270
            ),
1271
            "rural_gas_boiler": read_costs(
1272
                costs, "decentral gas boiler", "efficiency"
1273
            ),
1274
        }
1275
1276
        # Insert overnight investment costs, in EUR/MWh
1277
        parameters["overnight_cost"] = {
1278
            "central_water_tank": read_costs(
1279
                costs, "central water tank storage", "investment"
1280
            ),
1281
            "rural_water_tank": read_costs(
1282
                costs, "decentral water tank storage", "investment"
1283
            ),
1284
        }
1285
1286
        # Insert lifetime
1287
        parameters["lifetime"] = {
1288
            "central_water_tank": read_costs(
1289
                costs, "central water tank storage", "lifetime"
1290
            ),
1291
            "rural_water_tank": read_costs(
1292
                costs, "decentral water tank storage", "lifetime"
1293
            ),
1294
        }
1295
1296
        # Insert annualized capital costs
1297
        parameters["capital_cost"] = {}
1298
1299
        for comp in parameters["overnight_cost"].keys():
1300
            parameters["capital_cost"][comp] = annualize_capital_costs(
1301
                parameters["overnight_cost"][comp],
1302
                parameters["lifetime"][comp],
1303
                global_settings("eGon100RE")["interest_rate"],
1304
            )
1305
1306
    elif scenario == "eGon2021":
1307
        parameters = {}
1308
1309
    elif scenario == "status2019":
1310
        parameters = {
1311
            "DE_demand_residential_TJ": 1658400
1312
            + 383300,  # [TJ], space heating + hot water, source: AG Energiebilanzen 2019 (https://ag-energiebilanzen.de/wp-content/uploads/2020/10/ageb_20v_v1.pdf)
1313
            "DE_demand_service_TJ": 567300
1314
            + 71500,  # [TJ], space heating + hot water, source: AG Energiebilanzen 2019 (https://ag-energiebilanzen.de/wp-content/uploads/2020/10/ageb_20v_v1.pdf)
1315
            "DE_district_heating_share": (189760 + 38248)
1316
            / (
1317
                1658400 + 383300 + 567300 + 71500
1318
            ),  # [TJ], source: AG Energiebilanzen 2019 (https://ag-energiebilanzen.de/wp-content/uploads/2021/11/bilanz19d.xlsx)
1319
        }
1320
1321
        costs = read_csv(2020)
1322
1323
        # Insert marginal_costs in EUR/MWh
1324
        # marginal cost can include fuel, C02 and operation and maintenance costs
1325
        parameters["marginal_cost"] = {
1326
            "central_heat_pump": read_costs(
1327
                costs, "central air-sourced heat pump", "VOM"
1328
            ),
1329
            "central_gas_chp": read_costs(costs, "central gas CHP", "VOM"),
1330
            "central_gas_boiler": read_costs(
1331
                costs, "central gas boiler", "VOM"
1332
            ),
1333
            "central_resistive_heater": read_costs(
1334
                costs, "central resistive heater", "VOM"
1335
            ),
1336
            "rural_heat_pump": 0,  # Danish Energy Agency, Technology Data for Individual Heating Plants
1337
        }
1338
1339
        # Insert efficiency in p.u.
1340
        parameters["efficiency"] = {
1341
            "central_gas_boiler": read_costs(
1342
                costs, "central gas boiler", "efficiency"
1343
            ),
1344
        }
1345
1346
    # elif scenario == "status2023":
1347
    #     parameters = {
1348
    #         #  source: AG Energiebilanzen 2022  https://ag-energiebilanzen.de/wp-content/uploads/2023/01/AGEB_22p2_rev-1.pdf
1349
    #         "DE_demand_residential_TJ": 1754.2 * 1e3
1350
    #         + 407.5 * 1e3,  # [TJ], Endenergieverbrauch Haushalte 2.1 Raumwärme + Warmwasser
1351
    #         "DE_demand_service_TJ": 668.4 * 1e3
1352
    #         + 44.3 * 1e3 ,  # [TJ], Endenergieverbrauch GHD 3.1 Raumwärme + Warmwasser
1353
    #         "DE_district_heating_share": (189760 + 38248)
1354
    #         / (
1355
    #             1658400 + 383300 + 567300 + 71500
1356
    #         ),  # [TJ], source: AG Energiebilanzen 2019 (https://ag-energiebilanzen.de/wp-content/uploads/2021/11/bilanz19d.xlsx)
1357
    #     } # TODO status2023 needs update
1358
    #
1359
    #     costs = read_csv(2020)
1360
    #
1361
    #     # Insert marginal_costs in EUR/MWh
1362
    #     # marginal cost can include fuel, C02 and operation and maintenance costs
1363
    #     parameters["marginal_cost"] = {
1364
    #         "central_heat_pump": read_costs(
1365
    #             costs, "central air-sourced heat pump", "VOM"
1366
    #         ),
1367
    #         "central_gas_chp": read_costs(costs, "central gas CHP", "VOM"),
1368
    #         "central_gas_boiler": read_costs(
1369
    #             costs, "central gas boiler", "VOM"
1370
    #         ),
1371
    #         "central_resistive_heater": read_costs(
1372
    #             costs, "central resistive heater", "VOM"
1373
    #         ),
1374
    #         "rural_heat_pump": 0,  # Danish Energy Agency, Technology Data for Individual Heating Plants
1375
    #     }
1376
    #
1377
    #     # Insert efficiency in p.u.
1378
    #     parameters["efficiency"] = {
1379
    #         "central_gas_boiler": read_costs(
1380
    #             costs, "central gas boiler", "efficiency"
1381
    #         ),
1382
    #     }
1383
1384
    else:
1385
        print(f"Scenario name {scenario} is not valid.")
1386
1387
    return parameters
1388