From 6b4050415968e699e31677965c872bb2db13253d Mon Sep 17 00:00:00 2001 From: Tom Brown Date: Wed, 19 Aug 2020 12:51:53 +0200 Subject: [PATCH] add_existing_baseyears: Correct for p_nom data is thermal output p_nom in PyPSA is capacity on the input side (from final energy), whereas existing capacities are given on output side (i.e. heat delivered). --- scripts/add_existing_baseyear.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/add_existing_baseyear.py b/scripts/add_existing_baseyear.py index cacca6a2..727037a1 100644 --- a/scripts/add_existing_baseyear.py +++ b/scripts/add_existing_baseyear.py @@ -353,7 +353,7 @@ def add_heating_capacities_installed_before_baseyear(n, baseyear, grouping_years carrier="{} {} heat pump".format(name,heat_pump_type), efficiency=efficiency, capital_cost=costs.at[costs_name,'efficiency']*costs.at[costs_name,'fixed'], - p_nom=p_nom[name]*ratio, + p_nom=p_nom[name]*ratio/costs.at[costs_name,'efficiency'], build_year=int(grouping_year), lifetime=costs.at[costs_name,'lifetime']) @@ -367,7 +367,7 @@ def add_heating_capacities_installed_before_baseyear(n, baseyear, grouping_years carrier=name + " resistive heater", efficiency=costs.at[name_type + ' resistive heater','efficiency'], capital_cost=costs.at[name_type + ' resistive heater','efficiency']*costs.at[name_type + ' resistive heater','fixed'], - p_nom=0.5*nodal_df['{} resistive heater'.format(heat_type)][nodes[name]]*ratio, + p_nom=0.5*nodal_df['{} resistive heater'.format(heat_type)][nodes[name]]*ratio/costs.at[name_type + ' resistive heater','efficiency'], build_year=int(grouping_year), lifetime=costs.at[costs_name,'lifetime']) @@ -381,7 +381,7 @@ def add_heating_capacities_installed_before_baseyear(n, baseyear, grouping_years efficiency=costs.at[name_type + ' gas boiler','efficiency'], efficiency2=costs.at['gas','CO2 intensity'], capital_cost=costs.at[name_type + ' gas boiler','efficiency']*costs.at[name_type + ' gas boiler','fixed'], - p_nom=0.5*nodal_df['{} gas boiler'.format(heat_type)][nodes[name]]*ratio, + p_nom=0.5*nodal_df['{} gas boiler'.format(heat_type)][nodes[name]]*ratio/costs.at[name_type + ' gas boiler','efficiency'], build_year=int(grouping_year), lifetime=costs.at[name_type + ' gas boiler','lifetime']) n.madd("Link", @@ -394,7 +394,7 @@ def add_heating_capacities_installed_before_baseyear(n, baseyear, grouping_years efficiency=costs.at['decentral oil boiler','efficiency'], efficiency2=costs.at['oil','CO2 intensity'], capital_cost=costs.at['decentral oil boiler','efficiency']*costs.at['decentral oil boiler','fixed'], - p_nom=0.5*nodal_df['{} oil boiler'.format(heat_type)][nodes[name]]*ratio, + p_nom=0.5*nodal_df['{} oil boiler'.format(heat_type)][nodes[name]]*ratio/costs.at['decentral oil boiler','efficiency'], build_year=int(grouping_year), lifetime=costs.at[name_type + ' gas boiler','lifetime'])