Skip to content
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

Mismatch between length of bus0 and bus1 while adding SMR and other technologies in prepare_sector_network.py #1148

Closed
2 tasks done
yerbol-akhmetov opened this issue Oct 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@yerbol-akhmetov
Copy link
Collaborator

yerbol-akhmetov commented Oct 18, 2024

Checklist

  • I am using the current main branch or the latest release. Please indicate.
  • I am running on an up-to-date pypsa-earth environment. Update via conda env update -f envs/environment.yaml.

Describe the Bug

Good day. The issue is related to addition of SMR into the network in prepare_sector_network.py script in h2_hc_conversions function. When adding SMR of SMR CC, the error of mismatch between bus1 and bus0. In particular, nodes are used for bus1 and spatial.gas.nodes are used for bus0. It causes error, as nodes consider only AC nodes, while spatial.gas.nodes considers both AC and DC nodes. So error is related to this piece of code:

            n.madd(
                "Link",
                spatial.nodes,
                suffix=" SMR CC",
                bus0=spatial.gas.nodes,
                bus1=nodes + " H2",
                bus2="co2 atmosphere",
                bus3=spatial.co2.nodes,
                p_nom_extendable=True,
                carrier="SMR CC",
                efficiency=costs.at["SMR CC", "efficiency"],
                efficiency2=costs.at["gas", "CO2 intensity"]
                * (1 - options["cc_fraction"]),
                efficiency3=costs.at["gas", "CO2 intensity"] * options["cc_fraction"],
                capital_cost=costs.at["SMR CC", "fixed"],
                lifetime=costs.at["SMR CC", "lifetime"],
            )

Error Message

image

The fix will be presented in this PR
@hazemakhalek

@yerbol-akhmetov yerbol-akhmetov added the bug Something isn't working label Oct 18, 2024
@hazemakhalek
Copy link
Collaborator

hazemakhalek commented Oct 20, 2024

Thanks for pointing this out. So far we only worked with force_AC turned on.
A good permanent solution here will be great. It has to accommodate for the Force_AC case as well
@yerbol-akhmetov

@yerbol-akhmetov
Copy link
Collaborator Author

yerbol-akhmetov commented Oct 31, 2024

@davide-f , I am closing the issue as it was solved by merged PR https://github.com/pypsa-meets-earth/pypsa-earth/pull/1145/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants