|
22 | 22 | # Defining global variables |
23 | 23 |
|
24 | 24 | TWh2PJ = 3.6 |
25 | | -MWh2TJ = 3.6e-3 |
26 | 25 | MW2GW = 1e-3 |
27 | 26 | MW2TW = 1e-6 |
28 | 27 | t2Mt = 1e-6 |
29 | 28 |
|
30 | 29 | MWh2GJ = 3.6 |
31 | | -TWh2PJ = 3.6 |
32 | 30 | MWh2PJ = 3.6e-6 |
33 | 31 | toe_to_MWh = 11.630 # GWh/ktoe OR MWh/toe |
34 | 32 |
|
@@ -4660,219 +4658,6 @@ def get_production(region, year): |
4660 | 4658 | return var |
4661 | 4659 |
|
4662 | 4660 |
|
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 | | - |
4876 | 4661 | def get_grid_capacity(n, region, year): |
4877 | 4662 | var = pd.Series() |
4878 | 4663 | ### Total Capacity |
@@ -5299,7 +5084,6 @@ def get_ariadne_var( |
5299 | 5084 | get_emissions(n, region, energy_totals, industry_demand), |
5300 | 5085 | get_policy(n, year), |
5301 | 5086 | get_trade(n, region), |
5302 | | - # get_operational_and_capital_costs(year), |
5303 | 5087 | get_economy(n, region), |
5304 | 5088 | get_system_cost(n, region), |
5305 | 5089 | ] |
|
0 commit comments