Merge branch 'master' into complete-carrier-set

This commit is contained in:
Fabian Hofmann 2023-05-03 17:42:29 +02:00 committed by GitHub
commit de16f19bce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 80 additions and 22 deletions

View File

@ -3,3 +3,6 @@ contact_links:
- name: PyPSA Mailing List
url: https://groups.google.com/forum/#!forum/pypsa
about: Please ask and answer general usage questions here.
- name: Stackoverflow
url: https://stackoverflow.com/questions/tagged/pypsa
about: Please ask and answer code-related questions here.

View File

@ -39,7 +39,7 @@ repos:
# Make docstrings PEP 257 compliant
- repo: https://github.com/PyCQA/docformatter
rev: v1.6.3
rev: v1.6.4
hooks:
- id: docformatter
args: ["--in-place", "--make-summary-multi-line", "--pre-summary-newline"]

View File

@ -11,6 +11,7 @@ SPDX-License-Identifier: CC-BY-4.0
[![Zenodo PyPSA-Eur-Sec](https://zenodo.org/badge/DOI/10.5281/zenodo.3938042.svg)](https://doi.org/10.5281/zenodo.3938042)
[![Snakemake](https://img.shields.io/badge/snakemake-≥5.0.0-brightgreen.svg?style=flat)](https://snakemake.readthedocs.io)
[![REUSE status](https://api.reuse.software/badge/github.com/pypsa/pypsa-eur)](https://api.reuse.software/info/github.com/pypsa/pypsa-eur)
[![Stack Exchange questions](https://img.shields.io/stackexchange/stackoverflow/t/pypsa)](https://stackoverflow.com/questions/tagged/pypsa)
# PyPSA-Eur: A Sector-Coupled Open Optimisation Model of the European Energy System
@ -90,6 +91,14 @@ to 50-200 nodes.
Already-built versions of the model can be found in the accompanying [Zenodo
repository](https://doi.org/10.5281/zenodo.3601881).
# Contributing and Support
We strongly welcome anyone interested in contributing to this project. If you have any ideas, suggestions or encounter problems, feel invited to file issues or make pull requests on GitHub.
- In case of code-related **questions**, please post on [stack overflow](https://stackoverflow.com/questions/tagged/pypsa).
- For non-programming related and more general questions please refer to the [mailing list](https://groups.google.com/group/pypsa).
- To **discuss** with other PyPSA users, organise projects, share news, and get in touch with the community you can use the [discord server](https://discord.gg/JTdvaEBb).
- For **bugs and feature requests**, please use the [PyPSA-Eur Github Issues page](https://github.com/PyPSA/pypsa-eur/issues).
# Licence
The code in PyPSA-Eur is released as free software under the

View File

@ -469,6 +469,8 @@ sector:
dac: true
co2_vent: false
allam_cycle: false
hydrogen_fuel_cell: true
hydrogen_turbine: false
SMR: true
regional_co2_sequestration_potential:
enable: false # enable regionally resolved geological co2 storage potential
@ -902,6 +904,7 @@ plotting:
H2 pipeline: '#f081dc'
H2 pipeline retrofitted: '#ba99b5'
H2 Fuel Cell: '#c251ae'
H2 turbine: '#991f83'
H2 Electrolysis: '#ff29d9'
# ammonia
NH3: '#46caf0'

View File

@ -31,7 +31,9 @@ PyPSA-Eur: A Sector-Coupled Open Optimisation Model of the European Energy Syste
:target: https://api.reuse.software/info/github.com/pypsa/pypsa-eur
:alt: REUSE
|
.. image:: https://img.shields.io/stackexchange/stackoverflow/t/pypsa
:target: https://stackoverflow.com/questions/tagged/pypsa
:alt: Stackoverflow
PyPSA-Eur is an open model dataset of the European energy system at the
transmission network level that covers the full ENTSO-E area. It covers demand
@ -274,4 +276,5 @@ The included ``.nc`` files are PyPSA network files which can be imported with Py
licenses
limitations
contributing
support
publications

View File

@ -39,7 +39,7 @@ The environment can be installed and activated using
.. code:: bash
.../pypsa-eur % mamba create -f envs/environment.yaml
.../pypsa-eur % mamba env create -f envs/environment.yaml
.../pypsa-eur % mamba activate pypsa-eur

View File

@ -19,6 +19,10 @@ Upcoming Release
* Add plain hydrogen turbine as additional re-electrification option besides
hydrogen fuel cell. Add switches for both re-electrification options under
``sector: hydrogen_turbine:`` and ``sector: hydrogen_fuel_cell:``.
PyPSA-Eur 0.8.0 (18th March 2023)
=================================

14
doc/support.rst Normal file
View File

@ -0,0 +1,14 @@
..
SPDX-FileCopyrightText: 2019-2023 The PyPSA-Eur Authors
SPDX-License-Identifier: CC-BY-4.0
#######################
Support
#######################
* In case of code-related **questions**, please post on `stack overflow <https://stackoverflow.com/questions/tagged/pypsa>`_.
* For non-programming related and more general questions please refer to the `mailing list <https://groups.google.com/group/pypsa>`_.
* To **discuss** with other PyPSA users, organise projects, share news, and get in touch with the community you can use the [discord server](https://discord.gg/JTdvaEBb).
* For **bugs and feature requests**, please use the `issue tracker <https://github.com/PyPSA/pypsa-eur/issues>`_.
* We strongly welcome anyone interested in providing **contributions** to this project. If you have any ideas, suggestions or encounter problems, feel invited to file issues or make pull requests on `Github <https://github.com/PyPSA/PyPSA>`_. For further information on how to contribute, please refer to :ref:`contributing`.

View File

@ -513,7 +513,7 @@ def prepare_cost_retro(country_iso_dic):
def prepare_temperature_data():
"""
returns the temperature dependent data for each country:
Returns the temperature dependent data for each country:
d_heat : length of heating season pd.Series(index=countries) [days/year]
on those days, daily average temperature is below
@ -621,7 +621,7 @@ def calculate_costs(u_values, l, cost_retro, window_assumptions):
def calculate_new_u(u_values, l, l_weight, window_assumptions, k=0.035):
"""
calculate U-values after building retrofitting, depending on the old
Calculate U-values after building retrofitting, depending on the old
U-values (u_values). This is for simple insulation measuers, adding an
additional layer of insulation.
@ -682,7 +682,7 @@ def map_tabula_to_hotmaps(df_tabula, df_hotmaps, column_prefix):
def get_solar_gains_per_year(window_area):
"""
returns solar heat gains during heating season in [kWh/a] depending on the
Returns solar heat gains during heating season in [kWh/a] depending on the
window area [m^2] of the building, assuming a equal distributed window
orientation (east, south, north, west)
"""
@ -718,7 +718,7 @@ def map_to_lstrength(l_strength, df):
def calculate_heat_losses(u_values, data_tabula, l_strength, temperature_factor):
"""
calculates total annual heat losses Q_ht for different insulation
Calculates total annual heat losses Q_ht for different insulation
thicknesses (l_strength), depending on current insulation state (u_values),
standard building topologies and air ventilation from TABULA (data_tabula)
and the accumulated difference between internal and external temperature
@ -840,7 +840,7 @@ def calculate_heat_losses(u_values, data_tabula, l_strength, temperature_factor)
def calculate_heat_gains(data_tabula, heat_transfer_perm2, d_heat):
"""
calculates heat gains Q_gain [W/m^2], which consititure from gains by:
Calculates heat gains Q_gain [W/m^2], which consititure from gains by:
(1) solar radiation (2) internal heat gains
"""
@ -885,7 +885,7 @@ def calculate_space_heat_savings(
u_values, data_tabula, l_strength, temperature_factor, d_heat
):
"""
calculates space heat savings (dE_space [per unit of unrefurbished state])
Calculates space heat savings (dE_space [per unit of unrefurbished state])
through retrofitting of the thermal envelope by additional insulation
material (l_strength[m])
"""

View File

@ -1068,18 +1068,40 @@ def add_storage_and_grids(n, costs):
lifetime=costs.at["electrolysis", "lifetime"],
)
n.madd(
"Link",
nodes + " H2 Fuel Cell",
bus0=nodes + " H2",
bus1=nodes,
p_nom_extendable=True,
carrier="H2 Fuel Cell",
efficiency=costs.at["fuel cell", "efficiency"],
capital_cost=costs.at["fuel cell", "fixed"]
* costs.at["fuel cell", "efficiency"], # NB: fixed cost is per MWel
lifetime=costs.at["fuel cell", "lifetime"],
)
if options["hydrogen_fuel_cell"]:
logger.info("Adding hydrogen fuel cell for re-electrification.")
n.madd(
"Link",
nodes + " H2 Fuel Cell",
bus0=nodes + " H2",
bus1=nodes,
p_nom_extendable=True,
carrier="H2 Fuel Cell",
efficiency=costs.at["fuel cell", "efficiency"],
capital_cost=costs.at["fuel cell", "fixed"]
* costs.at["fuel cell", "efficiency"], # NB: fixed cost is per MWel
lifetime=costs.at["fuel cell", "lifetime"],
)
if options["hydrogen_turbine"]:
logger.info(
"Adding hydrogen turbine for re-electrification. Assuming OCGT technology costs."
)
# TODO: perhaps replace with hydrogen-specific technology assumptions.
n.madd(
"Link",
nodes + " H2 turbine",
bus0=nodes + " H2",
bus1=nodes,
p_nom_extendable=True,
carrier="H2 turbine",
efficiency=costs.at["OCGT", "efficiency"],
capital_cost=costs.at["OCGT", "fixed"]
* costs.at["OCGT", "efficiency"], # NB: fixed cost is per MWel
lifetime=costs.at["OCGT", "lifetime"],
)
cavern_types = snakemake.config["sector"]["hydrogen_underground_storage_locations"]
h2_caverns = pd.read_csv(snakemake.input.h2_cavern, index_col=0)

View File

@ -166,7 +166,7 @@ def prepare_network(n, solve_opts=None, config=None):
"Generator",
buses_i,
" load",
bus=n.buses.index,
bus=buses_i,
carrier="load",
sign=1e-3, # Adjust sign to measure p and p_nom in kW instead of MW
marginal_cost=load_shedding, # Eur/kWh