-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with PyPSA-Ariadne derivative #827
Conversation
… land transport oil (ICEs), naphtha for industry and kerosene for aviation (before summed as 'oil'), shipping oil, shipping methanol, agriculture machinery oil
…et_national'] to include all necessary links in national co2 budget constraints
…under 'co2_spatial: true' flag
So that DAC extracts CO2 rather than pumping into air; for p>0, link withdraws from bus0, but injects into bus1/2/3, so you have to take account of this sign difference-
Without this naming fix, the p_set is a NaN once added
This was overestimating ICE oil demand by factor 1/0.3.
Now naphtha demand causes process emissions from steak crackers to route to process emissions bus, then rest of CO2 goes to atmosphere.
Numerical problems were causing infeasibilities otherwise
To add this, overwrite the rule with a new argument: snakemake.input.additional_functionality
This undoes commit 830019a. Reason: this was introduced for the PyPSA-Ariadne derivative, but can be handled more elegantly within the derivative repository.
Force a single supply bus for oil/methanol (until we allow oil/methanol transport). Introduce new config switches "regional_oil/methanol_demand" that allow demand to be regionalised. This is important if regional CO2 budgets need to be enforced.
This can be added by derived workflows like PyPSA-Eur via additional_functionality. Changed additional_functionality to pass snakemake rather than wildcards and config separately. This gives maximal flexibility.
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! We'll have to see how the computational burden pans out with the additional links, but I can see the need for it. The layout will also help with further endogenising demands.
I'll resolve the merge conflicts and add release notes / some documentation.
Confirmed virtually identical results to previous version, both with copperplated or regionalised MeOH/oil demands. |
These changes allow compatibility with the model PyPSA-Ariadne that builds on PyPSA-Eur with PyPSA-Eur as a submodule.
Changes proposed in this Pull Request
solve_network.py
: An input file calledadditional_functionality
can be passed to the rule and imported and run asextra_functionality
. See the PyPSA-Ariadne example.solve_network.py
: If model is infeasible, compute and print infeasibilities.prepare_sector_network.py
: Remove all negative loads on theco2 atmosphere
bus representing emissions for e.g. fixed fossil demands for transport oil. Instead these are handled more transparently with fixed transport oil demand and a link taking care of the emissions to theco2 atmosphere
bus. This is also good preparation for endogenous transport optimisation, where demand will be subject to optimisation.prepare_sector_network.py
: Allow possibility to go from EU to nodal methanol and oil demand with switchesregional_{oil,methanol}_demand
. This allows nodal/regional CO2 constraints to be applied.prepare_sector_network.py
: Process emissions from steam crackers (i.e. naphtha processing for HVC) are now piped from the consumption link to the process emissions bus where the model can decide about carbon capture. Previously the process emissions for naphtha were a fixed load.add_brownfield.py
: New functiondisable_grid_expansion_if_LV_limit_hit
to disable grid expansion if the line volume limit is hit. This is to avoid numerical problems.Checklist
envs/environment.yaml
.config.default.yaml
.doc/configtables/*.csv
.doc/release_notes.rst
is added.