Merge branch 'master' into dh-share

This commit is contained in:
Fabian Neumann 2021-08-04 18:29:57 +02:00 committed by GitHub
commit e7c6b8c2c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 1050 additions and 991 deletions

View File

@ -30,6 +30,7 @@ scenario:
# B for biomass supply, I for industry, shipping and aviation
# solar+c0.5 reduces the capital cost of solar to 50\% of reference value
# solar+p3 multiplies the available installable potential by factor 3
# co2 stored+e2 multiplies the potential of CO2 sequestration by a factor 2
# dist{n} includes distribution grids with investment cost of n times cost in data/costs.csv
# for myopic/perfect foresight cb states the carbon budget in GtCO2 (cumulative
# emissions throughout the transition path in the timeframe determined by the
@ -71,7 +72,8 @@ electricity:
# regulate what components with which carriers are kept from PyPSA-Eur;
# some technologies are removed because they are implemented differently
# or have different year-dependent costs in PyPSA-Eur-Sec
# (e.g. battery or H2 storage) or have different year-dependent costs
# in PyPSA-Eur-Sec
pypsa_eur:
Bus:
- AC
@ -179,6 +181,7 @@ sector:
transport_fuel_cell_efficiency: 0.5
transport_internal_combustion_efficiency: 0.3
shipping_average_efficiency: 0.4 #For conversion of fuel oil to propulsion in 2011
shipping_hydrogen_liquefaction: true # whether to consider liquefaction costs for shipping H2 demands
shipping_hydrogen_share: # 1 means all hydrogen FC
2020: 0
2025: 0

View File

@ -89,10 +89,8 @@ The data licences and sources are given in the following table.
Set up the default configuration
================================
First make your own copy of the ``config.yaml``. For overnight
scenarios, use ``config.default.yaml``. For a pathway optimization
with myopic foresight (which is still experimental), use
``config.myopic.yaml``. For example:
First make your own copy of the ``config.yaml`` based on
``config.default.yaml``. For example:
.. code:: bash

View File

@ -60,8 +60,12 @@ Future release
These are included in the environment specifications of PyPSA-Eur.
* Consistent use of ``__main__`` block and further unspecific code cleaning.
* Distinguish costs for home battery storage and inverter from utility-scale battery costs.
* Added option for hydrogen liquefaction costs for hydrogen demand in shipping.
This introduces a new ``H2 liquid`` bus at each location.
It is activated via ``sector: shipping_hydrogen_liquefaction: true``.
* The share of shipping transformed into hydrogen fuel cell can be now defined for different years in the ``config.yaml`` file. The carbon emission from the remaining share is treated as a negative load on the atmospheric carbon dioxide bus, just like aviation and land transport emissions.
* The transformation of the Steel and Aluminium production can be now defined for different years in the ``config.yaml`` file.
* Include the option to alter the maximum energy capacity of a store via the ``carrier+factor`` in the ``{sector_opts}`` wildcard. This can be useful for sensitivity analyses. Example: ``co2 stored+e2`` multiplies the ``e_nom_max`` by factor 2. In this example, ``e_nom_max`` represents the CO2 sequestration potential in Europe.
PyPSA-Eur-Sec 0.5.0 (21st May 2021)
===================================

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 300 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 114 KiB

View File

@ -27,7 +27,7 @@ if __name__ == '__main__':
dri = dri_fraction * fraction_persistent_primary * production["Integrated steelworks"]
production.insert(2, "DRI + Electric arc", dri)
not_dri = (1 - dri_fraction) * fraction_persistent_primary
not_dri = (1 - dri_fraction)
production["Integrated steelworks"] = not_dri * fraction_persistent_primary * production["Integrated steelworks"]
production["Electric arc"] = total_steel - production["DRI + Electric arc"] - production["Integrated steelworks"]

View File

@ -906,7 +906,7 @@ def add_storage(n, costs):
)
# hydrogen stored overground (where not already underground)
h2_capital_cost = costs.at["hydrogen storage tank", "fixed"]
h2_capital_cost = costs.at["hydrogen storage tank incl. compressor", "fixed"]
nodes_overground = cavern_nodes.index.symmetric_difference(nodes)
n.madd("Store",
@ -941,9 +941,9 @@ def add_storage(n, costs):
p_min_pu=-1,
p_nom_extendable=True,
length=h2_links.length.values,
capital_cost=costs.at['H2 pipeline', 'fixed'] * h2_links.length.values,
capital_cost=costs.at['H2 (g) pipeline', 'fixed'] * h2_links.length.values,
carrier="H2 pipeline",
lifetime=costs.at['H2 pipeline', 'lifetime']
lifetime=costs.at['H2 (g) pipeline', 'lifetime']
)
n.add("Carrier", "battery")
@ -997,7 +997,7 @@ def add_storage(n, costs):
carrier="Sabatier",
efficiency=costs.at["methanation", "efficiency"],
efficiency2=-costs.at["methanation", "efficiency"] * costs.at['gas', 'CO2 intensity'],
capital_cost=costs.at["methanation", "fixed"],
capital_cost=costs.at["methanation", "fixed"] * costs.at["methanation", "efficiency"], # costs given per kW_gas
lifetime=costs.at['methanation', 'lifetime']
)
@ -1751,6 +1751,30 @@ def add_industry(n, costs):
p_set=industrial_demand.loc[nodes, "hydrogen"] / 8760
)
if options["shipping_hydrogen_liquefaction"]:
n.madd("Bus",
nodes,
suffix=" H2 liquid",
carrier="H2 liquid",
location=nodes
)
n.madd("Link",
nodes + " H2 liquefaction",
bus0=nodes + " H2",
bus1=nodes + " H2 liquid",
carrier="H2 liquefaction",
efficiency=costs.at["H2 liquefaction", 'efficiency'],
capital_cost=costs.at["H2 liquefaction", 'fixed'],
p_nom_extendable=True,
lifetime=costs.at['H2 liquefaction', 'lifetime']
)
shipping_bus = nodes + " H2 liquid"
else:
shipping_bus = nodes + " H2"
all_navigation = ["total international navigation", "total domestic navigation"]
efficiency = options['shipping_average_efficiency'] / costs.at["fuel cell", "efficiency"]
shipping_hydrogen_share = get(options['shipping_hydrogen_share'], investment_year)
@ -1759,7 +1783,7 @@ def add_industry(n, costs):
n.madd("Load",
nodes,
suffix=" H2 for shipping",
bus=nodes + " H2",
bus=shipping_bus,
carrier="H2 for shipping",
p_set=p_set
)
@ -1769,7 +1793,7 @@ def add_industry(n, costs):
shipping_oil_share = 1 - shipping_hydrogen_share
p_set = shipping_oil_share * nodal_energy_totals.loc[nodes, all_navigation].sum(axis=1) * 1e6 / 8760.
n.madd("Load",
nodes,
suffix=" shipping oil",
@ -1986,14 +2010,19 @@ def maybe_adjust_costs_and_potentials(n, opts):
suptechs = map(lambda c: c.split("-", 2)[0], carrier_list)
if oo[0].startswith(tuple(suptechs)):
carrier = oo[0]
attr_lookup = {"p": "p_nom_max", "c": "capital_cost"}
attr_lookup = {"p": "p_nom_max", "e": "e_nom_max", "c": "capital_cost"}
attr = attr_lookup[oo[1][0]]
factor = float(oo[1][1:])
#beware if factor is 0 and p_nom_max is np.inf, 0*np.inf is nan
if carrier == "AC": # lines do not have carrier
n.lines[attr] *= factor
else:
comps = {"Generator", "Link", "StorageUnit"} if attr == 'p_nom_max' else {"Generator", "Link", "StorageUnit", "Store"}
if attr == 'p_nom_max':
comps = {"Generator", "Link", "StorageUnit"}
elif attr == 'e_nom_max':
comps = {"Store"}
else:
comps = {"Generator", "Link", "StorageUnit", "Store"}
for c in n.iterate_components(comps):
if carrier=='solar':
sel = c.df.carrier.str.contains(carrier) & ~c.df.carrier.str.contains("solar rooftop")

View File

@ -151,7 +151,6 @@ def add_chp_constraints(n):
def extra_functionality(n, snapshots):
add_chp_constraints(n)
add_battery_constraints(n)