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

Add converters as links and enable DC #392

Merged
merged 90 commits into from
Jul 19, 2022
Merged

Add converters as links and enable DC #392

merged 90 commits into from
Jul 19, 2022

Conversation

ekatef
Copy link
Member

@ekatef ekatef commented Jun 22, 2022

Closes #385

Changes proposed in this Pull Request

The aim of the PR is to enable DC carrier in the network model and include converters as Link component

Checklist

  • I tested my contribution locally and it seems to work fine.
  • Code and workflow changes are sufficiently documented.
  • Newly introduced dependencies are added to envs/environment.yaml and envs/environment.docs.yaml.
  • Changes in configuration options are added in all of config.default.yaml, config.tutorial.yaml, and test/config.test1.yaml.
  • Changes in configuration options are also documented in doc/configtables/*.csv and line references are adjusted in doc/configuration.rst and doc/tutorial.rst.
  • A note for the release notes doc/release_notes.rst is amended in the format of previous release notes, including reference to the requested PR.

@davide-f davide-f added this to the Version 0.1 milestone Jun 23, 2022
@ekatef
Copy link
Member Author

ekatef commented Jul 13, 2022

The network topology now looks like that:

base network csv data

general view

fragment a

fragment_a

fragment b

fragment_b

fragment c

fragment_c

fragment d

fragment_d

@ekatef
Copy link
Member Author

ekatef commented Jul 13, 2022

base _network

Links in red, transformers in orange

HVDC as lines

base nc_dc_by_freq

HVDC as links

base nc_dc_by_freq

@ekatef
Copy link
Member Author

ekatef commented Jul 13, 2022

simplified network

HVDC as lines

elec_s nc_dc_by_freq

HVDC as links

elec_s nc_dc_by_freq

@ekatef
Copy link
Member Author

ekatef commented Jul 13, 2022

Test on the continental scale runs but I was not able to achieve any improvements regarding the infeasibility. Gurobi refuses to operate without a proper license for that size of problem (understandable) while working with the glpk interface was found to be not quite obvious :))

An additional problem found during testing for the continent were troubles for HVDC line in Namibia. The weights both from the generator and the load parts are by some reason zero which leads to division by zero:

https://github.com/pypsa-meets-africa/pypsa-africa/blob/66a162573b2cee9bf0c8622a4fb5e3c15193e70f/scripts/cluster_network.py#L173-L178

Have introduced a quick fix but I think it makes sense to look a bit more careful into that. Not necessarily as a part of this PR :)

@ekatef
Copy link
Member Author

ekatef commented Jul 13, 2022

Note to the network pictures above: now connections of the DC buses to the lines were improved. The result is that the DC buses are kept in the network model without any additional settings (like a requirement to match the carrier during the stubs removal).

@davide-f
Copy link
Member

@ekatef Very nice, few comments:

  • why in fragment a there are 4 AC nodes? Do we have 4 different voltages + DC?
  • Between the lines and link implementation, the location of buses change, how do you think it can be justified?
  • The Namibia problem is related for sure to the fact that "NA" is interpreted as NaN for some reason... We already so that issue and we will solve it.

@ekatef
Copy link
Member Author

ekatef commented Jul 14, 2022

@davide-f, many thanks for checking! That's is always a bit of a challenge to finalise properly something more or less big :) And your support is a huge help in that.

To answer point-by-point:

  • Yes, exactly. There are the voltage levels 132, 220, 400, 500 kV while the converter connects AC and DC nodes corresponding to the HV.
  • I can confirm that this transformation is the result of simplify_links() application and plan to look into it a bit deeper.
  • Good to know! Have removed the temporary fix.

@davide-f davide-f marked this pull request as ready for review July 14, 2022 22:28
Copy link
Member

@davide-f davide-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ekatef Awesome! Few comments before merging :)

config.default.yaml Outdated Show resolved Hide resolved
config.default.yaml Show resolved Hide resolved
doc/release_notes.rst Outdated Show resolved Hide resolved
envs/environment.yaml Show resolved Hide resolved
scripts/base_network.py Outdated Show resolved Hide resolved
scripts/base_network.py Outdated Show resolved Hide resolved
scripts/cluster_network.py Outdated Show resolved Hide resolved
scripts/simplify_network.py Show resolved Hide resolved
@davide-f davide-f self-requested a review July 16, 2022 16:45
@davide-f
Copy link
Member

@ekatef super! PR merged, thank you very much for the great work!

@davide-f davide-f merged commit c42adc9 into pypsa-meets-earth:main Jul 19, 2022
@ekatef
Copy link
Member Author

ekatef commented Jul 19, 2022

@davide-f thank you for supporting it :) It was a pleasure to contribute!

pz-max pushed a commit that referenced this pull request Sep 24, 2022
Add converters as links and enable DC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add converters as links and enable DC lines
3 participants